ok kita langsung aj ke penyelesaiannya...
#include < iostream.h >
#include < conio.h >
main()
{
float n1,n2,n3,n4,n5,n6,n7;
cout <<"DAFTAR NILAI SISWA BSI 2010\n";
cout <<"-------------------------------------\n";
cout <<"INPUT NILAI 1 = ";
cin >> n1;
cout <<"INPUT NILAI 2 = ";
cin >> n2;
cout <<"INPUT NILAI 3 = ";
cin >> n3;
cout <<"------------------------------------\n";
cout <<"NILAI 1 ADALAH = "<< n1 << endl;
cout <<"NILAI 2 ADALAH = "<< n2 << endl;
cout <<"NILAI 3 ADALAH = "<< n3 << endl;
n4 = n1 + n2;
n5 = n1 - n2;
n6 = n1 / n2;
n7 = n2 * n3;
cout <<"HASIL PENJUMLAHAN NILAI 1 DAN NILAI 2 = "<< n4 << endl;
cout <<"HASIL PENGURANGAN NILAI 1 DAN NILAI 2 = "<< n5 << endl;
cout <<"HASIL PEMBAGIAN NILAI 1 DAN NILAI 2 = "<< n6 << endl;
cout <<"HASIL PERKALIAN NILAI 2 DAN NILAI 3 = "<< n7 << endl;
getche ();
}
Tidak ada komentar:
Posting Komentar