#include<iostream>
#include<string>
using namespace std;
void main()
{
{
//MENGINPUT DATA BERUPA NAMA
string c;
string d;
cout<<"NAMA MAHASISWA"<<"\n";
cout<<"Baris ke 1 : ";cin>>c;
cout<<"Baris ke 2 : ";cin>>d;
cout<<"===================================================="<<"\n";
cout<<"Kolom 1: BPK"<<"\n";
cout<<"Kolom 2: RPL"<<"\n";
cout<<"Kolom 3: MTK"<<"\n";
cout<<"Kolom 4: B.Ing"<<"\n";
cout<<"Kolom 5: Agama"<<"\n";
}
//MEMPROSES DAN MENGINPUTKAN DATA ARRAY BERUPA TAMPILAN MATRIKS
cout<<"\n";
int a[2][5];
cout << "masukkan nilai : "<<"\n";
for (int i=0; i<2;i++)
{
for (int j=0;j<5;j++)
{
cin >> a[i][j];
}
}
cout<<"\n";
cout<<"\n";
cout <<"::::()=========>> Tabel Nilai <<=========()::::"<<"\n";
cout<<"BPK"<<"\t"<<"RPL"<<"\t"<<"MTK"<<"\t"<<"B.Ing"<<"\t"<<"Agama"<<"\n";
for (int x=0; x<2;x++)
{
for (int y=0;y<5;y++)
{
cout << a[x][y]<<"\t";
}
cout << endl;
}
//BERFUNGSI MEMILIH DATA YANG TERBESAR
cout<<"\n";
cout<<"\n";
cout<<"NILAI YANG TERBESAR"<<"\n";
cout<<"BPK : ";
if(a[0][0]>a[1][0])
cout<<a[0][0]<<"\n";
else if (a[0][0]==a[1][0])
cout<<"Nilai Sama"<<"\n";
else
cout<<a[1][0]<<"\n";
cout<<"RPL : ";
if(a[0][1]>a[1][1])
cout<<a[0][1]<<"\n";
else if (a[0][1]==a[1][1])
cout<<"Nilai Sama"<<"\n";
else
cout<<a[1][1]<<"\n";
cout<<"MTK : ";
if(a[0][2]>a[1][2])
cout<<a[0][2]<<"\n";
else if (a[0][2]==a[1][2])
cout<<"Nilai Sama"<<"\n";
else
cout<<a[1][2]<<"\n";
cout<<"B.Ing : ";
if(a[0][3]>a[1][3])
cout<<a[0][3]<<"\n";
else if (a[0][3]==a[1][3])
cout<<"Nilai Sama"<<"\n";
else
cout<<a[1][3]<<"\n";
cout<<"Agama : ";
if(a[0][4]>a[1][4])
cout<<a[0][4]<<"\n";
else if (a[0][4]==a[1][4])
cout<<"Nilai Sama"<<"\n";
else
cout<<a[1][4]<<"\n";
cout<<"\n";
cout<<"SOURCE KODE E MUET PENENG KEPALE B"<<"\n";
cout<<"SEMOGA TES E DAK MACEM NI -______-"<<"\n";
}
BERIKUT PRINT OUT
Tidak ada komentar:
Posting Komentar