diff --git a/main.cpp b/main.cpp index a495fc94..756b6261 100644 --- a/main.cpp +++ b/main.cpp @@ -6,16 +6,20 @@ int main() std::cout << "THE FIRST EXAMPLE MATH DISPLAY!\n"; std::cout << "Hi, please enter two whole numbers: "; - int x,y; + int x; + int y; + double quotient; std::cin >> x >> y; + quotient = x/(y*1.0); 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 << "Division: " << quotient << 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; + return 0; }