Archive for 2016
guys
ini ada ilmu baru buat kalian semua
c++ untuk cari nilai
#include <iostream>using namespace std;
int main()
{
int nilai ;
cout << "===================="<< endl;
cout << "NILAI HURUF"<< endl;
cout << "===================="<< endl;
cout << "95-100 A+"<< endl;
cout << "90-95 A-"<< endl;
cout << "85-90 B+"<< endl;
cout << "80-85 B-"<< endl;
cout << "70-80 C+"<< endl;
cout << "65-70 C-"<< endl;
cout << "55-65 D"<< endl;
cout << "0-50 E"<< endl;
cout << "===================="<< endl;
cout << " SILAHKAN MASUKKAN NILAI ANDA = ";
cin >> nilai;
cout << "====================" << endl;
if (nilai >= 95)
{
cout << "A+" << endl;
}
else if (nilai >= 90)
{
cout << "A-" << endl;
}
else if (nilai >= 85)
{
cout << "B+" << endl;
}
else if (nilai >= 80)
{
cout << "B-" << endl;
}
else if ( nilai >= 70)
{
cout << "C+" << endl;
}
else if ( nilai >= 65)
{
cout << "C-" << endl;
}
else if (nilai >= 55 )
{
cout << "D" << endl;
}
else if (nilai <= 50)
{
cout << "E" << endl;
}
return 0;
}