-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (31 loc) · 849 Bytes
/
main.cpp
File metadata and controls
35 lines (31 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream>
#include <stdlib.h>
using namespace std;
int main() {
int input, a, b;
cout << "============ Menu ============\n\n";
cout << "1. Penjumlahan & Pengurangan\n";
cout << "2. Perkalian & Pembagian\n";
cout << "3. Perpangkatan & Akar kuadrat\n";
cout << "==============================\n";
cout << "\n Input: ";
cin >> input;
switch(input) {
case 1:
system("cls");
cout << "Bilangan 1 : ";
cin >> a;
cout << "Bilangan 2 : ";
cin >> b;
cout << "\n" << a << " + " << b << " = " << a+b << endl;
cout << a << " - " << b << " = " << a-b << endl;
system("pause");// perhitungan penambahan dan pengurangan
break;
case 2:
//perhitungan perkalian dan pembagian
break;
case 3:
// perhitungan perpangkatan dan akar kuadrat
break;
}
}