#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
int nilai;
cout<<"\t\tProgram Konversi Nilai dari Angka ke Huruf "<<endl<<endl;
cout<<"Masukkan Nilai : ";
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;
}
raptornya
Comments
Post a Comment