#include using namespace std; int main(int argc, char** argv) { int a; string k; cout<<"Konversi Nilai angka ke dalam bentuk huruf\n\n"; cout<<"------------------------------------------\n\n"; cout<<"Masukan Nilai angka : ";cin>>a; if(a>0 && a<=20) k="E"; else if(a>20 && a<=40) k="D";
else if(a>40 && a<=60) k="C"; else if(a>60 && a<=80) k="B";
else if(a>80 && a<=100) k="A"; else k="error"; cout<<"\n\n----------------------------------------\n"; cout<<"Nilai Anda adalah : "<<k; return 0; }
sumber : https://riau2015.wordpress.com/2016/03/21/program-c/
EmoticonEmoticon