programnya
#include <iostream>
#include <string>
using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
int X;
raptor_prompt_variable_zzyz ="masukkan nilai:";
cout << raptor_prompt_variable_zzyz << endl;
cin >> X;
if (X>0 && X<=20)
{
cout << "nilai E" << endl; }
else
{
if (X>20 && X<=40)
{
cout << "nilai D" << endl; }
else
{
if (X>40 && X<=60)
{
cout << "nilai C" << endl; }
else
{
if (X>60 && X<=80)
{
cout << "nilai B" << endl; }
else
{
cout << "nilai A" << endl; }
}
}
}
system ("PAUSE");
return 0;
}
Tidak ada komentar:
Posting Komentar