-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows-desktop.cpp
71 lines (70 loc) · 2.1 KB
/
windows-desktop.cpp
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int oper;
double num1;
double num2;
cout << "DDDD GGG TTTTT N N TTTTT" << endl;
cout << "D D G T NN N T " << endl;
cout << "D D G G T N N N T " << endl;
cout << "D D G G T N NN T " << endl;
cout << "DDDD GGG T N N T " << endl;
cout << endl;
cout << "DGTNT Calc 1.0" << endl;
cout << endl;
cout << "Options:" << endl;
cout << "1: Addition" << endl;
cout << "2: Subtraction" << endl;
cout << "3: Multiplication" << endl;
cout << "4: Division" << endl;
cout << endl;
cout << "Enter your operation's number: ";
cin >> oper;
if(oper == 1) {
cout << "What is your first number? ";
cin >> num1;
cout << endl;
cout << "What is your second number? ";
cin >> num2;
cout << endl;
cout << num1 << " + " << num2 << " = " << num1+num2 << endl;
cout << "Press any key to exit";
getch();
}
if(oper == 2) {
cout << "What is your minuend? ";
cin >> num1;
cout << endl;
cout << "What is your subtrahend? ";
cin >> num2;
cout << endl;
cout << num1 << " - " << num2 << " = " << num1-num2 << endl;
cout << "Press any key to exit";
getch();
}
if(oper == 3) {
cout << "What is your first number? ";
cin >> num1;
cout << endl;
cout << "What is your second number? ";
cin >> num2;
cout << endl;
cout << num1 << " x " << num2 << " = " << num1*num2 << endl;
cout << "Press any key to exit";
getch();
}
if(oper == 4) {
cout << "What is your dividend? ";
cin >> num1;
cout << endl;
cout << "What is your divisor? ";
cin >> num2;
cout << endl;
cout << num1 << " / " << num2 << " = " << num1/num2 << endl;
cout << "Press any key to exit";
getch();
}
return 0;
}