Program masukkan A dan B

#include using namespace std; int main () { //kamus const int A = 3; const int B = 2; string a,b,c,d,e,f; //algoritma cout << "MASUKKAN a/b/c/d/e/f" << endl; if (cin >> a){ cout << A+B << endl;} else if (cin >> b){ cout << A-B << endl;} else if (cin >> c){ cout << A*B << endl;} else if (cin >> d){ cout << A/B << endl;} else if (cin >> e){ cout << A+B+A << endl;} else if (cin >> f){ cout << A%B << endl;} else { cout << "Bukan operasi yang benar" << endl;} return 0; }

0 komentar:

Posting Komentar

Red Nike Classic
Hibatul Ghazi Zulhasmi. Diberdayakan oleh Blogger.

Copyright © / ZULPEDIA

Template by : Urang-kurai / powered by :blogger