kalkulator sederhana di C++ Posted by bangpemrograman on January 13, 2015 Get link Facebook X Pinterest Email Other Apps #include using namespace std; unsigned int bil2,bit2; void konversi(unsigned int bil2){ if (bil2>1) { konversi(bil2/2); } bit2 = bil2 % 2; cout<>pil; switch(pil) { case 1: cout<<"\ninput bilangan pertama : "; cin>>n; cout<<"input bilangan kedua : "; cin>>m; hasil = n + m; cout<<"\n"<<"HASIL : "<>n; cout<<"input bilangan kedua : "; cin>>m; hasil = n * m; cout<<"\n"<<"HASIL : "<>n; cout<<"input bilangan kedua : "; cin>>m; hasil = n / m; cout<<"\n"<<"HASIL : "<>n; cout<<"input bilangan kedua : "; cin>>m; hasil = n - m; cout<<"\n"<<"HASIL : "<>n; cout<<"input bilangan kedua : "; cin>>m; for(i = m;i<=m;i++) { hasil = n; hasil *= n; } cout<<"\n"<<"HASIL : "<> hasil; konversi(hasil); break; default: printf("pilihan tidak ada....!!! coba yang tersdia "); } cout<<"\n\napakah ingin melanjutkan, jika ya tekan Y/y \njika tidak tekan sembarang tombol "; cin>>menu; }while(menu == 'y' || menu == 'Y'); system("pause"); } Comments
Comments
Post a Comment