Membuat Kalkulator Sederhana Dengan Dev C++
Cara membuat kalkulator sederhana dengan dev C++
#include <conio.h>
#include <iostream>
using namespace std;
main()
{
int a, b, c, d, e, f, g;
cout << "* Kalkulator Sederhana *\n";
cout << "*----------------------*\n";
cout << "Masukan Angka = "; cin >> a;
cout << "Masukan Angka = "; cin >> b;
//proses
c= a + b;
d= a - b;
e= a * b;
f= a / b;
g= a % b;
cout << "\nHasil Total Semua \n\n";
cout << "Hasil + = " << c << endl;
cout << "Hasil - = " << d << endl;
cout << "Hasil x = " << e << endl;
cout << "Hasil : = " << f << endl;
cout << "Hasil % = " << g << endl;
getch();
}
#include <conio.h>
#include <iostream>
using namespace std;
main()
{
int a, b, c, d, e, f, g;
cout << "* Kalkulator Sederhana *\n";
cout << "*----------------------*\n";
cout << "Masukan Angka = "; cin >> a;
cout << "Masukan Angka = "; cin >> b;
//proses
c= a + b;
d= a - b;
e= a * b;
f= a / b;
g= a % b;
cout << "\nHasil Total Semua \n\n";
cout << "Hasil + = " << c << endl;
cout << "Hasil - = " << d << endl;
cout << "Hasil x = " << e << endl;
cout << "Hasil : = " << f << endl;
cout << "Hasil % = " << g << endl;
getch();
}
Makasih banyak gan ilmunya sangat bermanfaat
BalasHapus