konversi nilai ke huruf

#include<iostream.h>

#include<conio.h>

using namespace std;

int main()

{

char q;

int nilai,jumlah,i;

do

{

system(“cls”);

cout<<” | ========================= |”<<endl;

cout<<” | Konversi Nilai Angka ke Nilai Huruf |”<<endl;

cout<<” |========================= |”<<endl<<endl;

cout<<” Masukkan Nilai : “;

cin>>nilai;

cout<<endl;

cout<<” ” << nilai ;

if (nilai>=0 && nilai<50 )

cout<<” = E “<<endl;

else if (nilai>=50 && nilai<65 )

cout<<” = D “<<endl;

else if (nilai>=65 && nilai<75 )

cout<<” = C “<<endl;

else if (nilai>=75 && nilai<85 )

cout<<” = B “<<endl;

else if (nilai>=85 && nilai<=100 )

cout<<” = A “<<endl;

cout<<endl;

cout<<” Ingin Hitung Kembali (y/t)?”;

cin>>q;

} while(q==’y’);

return 0;

}

konversinilaikehuruf

This entry was posted in Struktur Control and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *