#include<conio.h>
#include<iostream.h>
void main()
{
clrscr();
int nilai;
char mark;
cout<<"Masukkan nilai ujian [0-100] : ";
cin>>nilai;
cout<<"\n";
if (nilai>=90 && nilai<=100)
mark='A';
else if (nilai>=80 && nilai<=90)
mark='B';
else if (nilai>=70 && nilai<=80)
mark='C';
else if (nilai>=60 && nilai <=70)
mark='D';
else
mark='E';
cout<<"Nilai Ujian="<<mark;
getch();
}
No comments:
Post a Comment