Skip to content

Commit 2b5b074

Browse files
committed
Refactors out std:: closes #341
1 parent 4beaca6 commit 2b5b074

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

main.cpp

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
#include <iostream>
22
#include <cmath>
33

4+
using std::cin;
5+
using std::cout;
6+
using std::endl;
7+
48
int main()
59
{
6-
std::cout << "THE FIRST EXAMPLE MATH DISPLAY!\n";
7-
std::cout << "Hi, please enter two whole numbers: ";
10+
cout << "THE FIRST EXAMPLE MATH DISPLAY!\n";
11+
cout << "Hi, please enter two whole numbers: ";
812

9-
int x,y;
13+
int x, y;
1014

11-
std::cin >> x >> y;
12-
std::cout << "Addition: " << x + y << std::endl;
13-
std::cout << "Subtraction: " << x - y << std::endl;
14-
std::cout << "Multiplication: " << x * y << std::endl;
15-
std::cout << "Division: " << x / y << std::endl;
16-
std::cout << "Remainder: " << x % y << std::endl;
17-
std::cout << "Square Root: " << sqrt(x) << std::endl;
18-
std::cout << "Square: " << pow(x, y) << std::endl;
15+
cin >> x >> y;
16+
cout << "Addition: " << x + y << endl;
17+
cout << "Subtraction: " << x - y << endl;
18+
cout << "Multiplication: " << x * y << endl;
19+
cout << "Division: " << x / y << endl;
20+
cout << "Remainder: " << x % y << endl;
21+
cout << "Square Root: " << sqrt(x) << endl;
22+
cout << "Square: " << pow(x, y) << endl;
1923

2024
return 0;
2125
}

0 commit comments

Comments
 (0)