File tree Expand file tree Collapse file tree 1 file changed +29
-29
lines changed
Expand file tree Collapse file tree 1 file changed +29
-29
lines changed Original file line number Diff line number Diff line change 1- #include < iostream>
2- #include < cmath>
3-
4- using std::endl;
5- using std::cin;
6- using std::cout;
7-
8- int main ()
9- {
10- cout << " THE FIRST EXAMPLE MATH DISPLAY!\n " ;
11- cout << " Hi, please enter two whole numbers: " ;
12-
13- int x,y;
14-
15- cin >> x >> y;
16- cout << " Addition: " << x + y << endl;
17- cout << " Subtraction: " << x - y << endl;
18- cout << " Multiplication: " << x * y << endl;
19- if (y==0 ){
20- cout << " Dividing by zero is not a number." << endl;
21- cout << " Remainder: " << x << endl;
22- }else {
23- cout << " Division: " << x / y << endl;
24- cout << " Remainder: " << x % y << endl;
25- }
26- cout << " Square Root: " << sqrt (x) << endl;
27- cout << " Square: " << pow (x, y) << endl;
28-
29- return 0 ;
1+ #include < iostream>
2+ #include < cmath>
3+
4+ using std::endl;
5+ using std::cin;
6+ using std::cout;
7+
8+ int main ()
9+
10+ cout << "THE FIRST EXAMPLE MATH DISPLAY!\n";
11+ cout << " Hi, please enter two whole numbers: " ;
12+
13+ int x,y;
14+
15+ cin >> x >> y;
16+ cout << " Addition: " << x + y << endl;
17+ cout << " Subtraction: " << x - y << endl;
18+ cout << " Multiplication: " << x * y << endl;
19+ if (y==0 ){
20+ cout << " Dividing by zero is not a number." << endl;
21+ cout << " Remainder: " << x << endl;
22+ }else {
23+ cout << " Division: " << x / y << endl;
24+ cout << " Remainder: " << x % y << endl;
25+ }
26+ cout << " Square Root: " << sqrt(x) << endl;
27+ cout << " Square: " << pow(x, y) << endl;
28+
29+ return 0 ;
3030}
You can’t perform that action at this time.
0 commit comments