#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{ int nilai;
cout<<"========================================================="<<endl;
cout<<" PROGRAM KONVERSI NILAI MAHASISWA "<<endl;
cout<<"========================================================="<<endl;
cout<<"Masukkan nilai Mahasiswa : ";
cin>>nilai;
{
if (nilai >= 80 && nilai <=100){
cout<<"Nilai "<<nilai<<" = A"<<endl;
}
else if (nilai >= 65 && nilai <=79){
cout<<"Nilai "<<nilai<<" = B"<<endl;
}
else if (nilai >= 55 && nilai <=64){
cout<<"Nilai "<<nilai<<" = C"<<endl;
}
else if (nilai >= 40 && nilai <=54){
cout<<"Nilai "<<nilai<<" = D"<<endl;
}
else{
cout<<"Nilai "<<nilai<<" = E"<<endl;
}
}
system("pause");
return 0;
}
Hasil Compilenya
Tidak ada komentar:
Posting Komentar