#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int nilai;
char hasil;
cout<<"Nilai huruf \n";
cout<<"masukan nilai 0-100 \n\n\n";
cin>>nilai;
if(nilai>80 && nilai <=100);
hasil='A';
if(nilai>65 && nilai <=79);
hasil='B';
if(nilai>55 && nilai <=64);
hasil='C';
if(nilai>30 && nilai <=54);
hasil='D';
if(nilai>0 && nilai <=29);
hasil='E';
cout<<"mahasiswa mendapat nilai : "<<hasil;
return 0;
}
Tidak ada komentar:
Posting Komentar