#include <iostream>
#include <string>
using namespace std;
int main(){
int nilai;
cout << "Masukkan nilai angka : ";
cin >> nilai;
if (nilai>0 && nilai<=20)
{
cout << "Nilai huruf = E" << endl; }
else
{
if (nilai>20 && nilai<=40)
{
cout << "Nilai huruf = D" << endl; }
else
{
if (nilai>40 && nilai<=60)
{
cout << "Nilai huruf = C" << endl; }
else
{
if (nilai>60 && nilai<=80)
{
cout << "Nilai huruf = B" << endl; }
else
{
cout << "Nilai huruf = A" << endl; }
}
}
}
return 0;
}
Konversi nilai angka ke nilai huruf menggunakan Raptor :