#include "iostream.h"
#include "conio.h"
main()
{
int nilai;
cout<<"Masukkan Nilai Anda \t: ";
cin>>nilai ;
//if sentence
if (nilai>100)
{
cout<<"Maaf Nilai Yang Anda Masukkan Salah";
}
else if (nilai>=80)
{
cout<<"A";
}
else if (nilai>=65)
{
cout<<"B";
}
else if (nilai>=55)
{
cout<<"C";
}
else if (nilai>=45)
{
cout<<"D";
}
else
{
cout<<"E";
}
getch();
}
Subscribe to:
Post Comments (Atom)
0 Response to "Tugas Struktur Data C ++ : Program Mencari Nilai Huruf Berdasarkan Nilai Angka"
Post a Comment