diff --git a/main.cpp b/main.cpp index a495fc94..8c254445 100644 --- a/main.cpp +++ b/main.cpp @@ -4,11 +4,13 @@ int main() { std::cout << "THE FIRST EXAMPLE MATH DISPLAY!\n"; - std::cout << "Hi, please enter two whole numbers: "; + std::cout << "Hi, please enter two whole numbers (Limited to whole numbers between -2,147,483,648 and 2,147,483,647): "; - int x,y; + int32_t x,y; - std::cin >> x >> y; + std::cin >> x; + std::cin.clear(); // clear input buffer in case user inputs value outside expected range + std::cin >> y; std::cout << "Addition: " << x + y << std::endl; std::cout << "Subtraction: " << x - y << std::endl; std::cout << "Multiplication: " << x * y << std::endl;