diff --git a/main.cpp b/main.cpp index a495fc9..b0a5878 100644 --- a/main.cpp +++ b/main.cpp @@ -7,6 +7,21 @@ int main() std::cout << "Hi, please enter two whole numbers: "; int x,y; + + cin >> x >> y; + cout << "Addition: " << x + y << endl; + cout << "Subtraction: " << x - y << endl; + cout << "Multiplication: " << x * y << endl; + if ( y == 0) + { + cout << " Division: Not a number error " << endl; + } + else + { + cout << "Division: " << x / y << endl; + cout << "Remainder: " << x % y << endl; + cout << "Square Root: " << sqrt(x) << endl; + cout << "Square: " << pow(x, y) << endl; std::cin >> x >> y; std::cout << "Addition: " << x + y << std::endl; @@ -17,5 +32,7 @@ int main() std::cout << "Square Root: " << sqrt(x) << std::endl; std::cout << "Square: " << pow(x, y) << std::endl; - return 0; + + } + return 0; }