diff --git a/main.cpp b/main.cpp index a495fc9..8e553a8 100644 --- a/main.cpp +++ b/main.cpp @@ -1,21 +1,23 @@ #include #include +using namespace std; + int main() { - std::cout << "THE FIRST EXAMPLE MATH DISPLAY!\n"; - std::cout << "Hi, please enter two whole numbers: "; + cout << "THE FIRST EXAMPLE MATH DISPLAY!\n"; + cout << "Hi, please enter two whole numbers: "; - int x,y; + int x, y; - std::cin >> x >> y; - std::cout << "Addition: " << x + y << std::endl; - std::cout << "Subtraction: " << x - y << std::endl; - std::cout << "Multiplication: " << x * y << std::endl; - std::cout << "Division: " << x / y << std::endl; - std::cout << "Remainder: " << x % y << std::endl; - std::cout << "Square Root: " << sqrt(x) << std::endl; - std::cout << "Square: " << pow(x, y) << std::endl; + cin >> x >> y; + cout << "Addition: " << x << " + " << y << " = " << x + y << endl; + cout << "Subtraction: " << x << " - " << y << " = " << x - y << endl; + cout << "Multiplication: " << x << " * " << y << " = " << x * y << endl; + cout << "Division: " << x << " / " << y << " = " << x / y << " with a remainder of: " << x % y << endl; + cout << "Square Root of " << x << " is " << sqrt(x) << endl; + cout << "Square Root of " << y << " is " << sqrt(y) << endl; + cout << "Square: " << x << "^" << y << " = " << pow(x, y) << endl; return 0; }