Question
write a C++ Program called Final, which asks the user to enter two integers. If the first integer is larger than the second integer, the
write a C++ Program called Final, which asks the user to enter two integers. If the first integer is larger than the second integer, the program will add the two numbers, and display the sum. If the second integer is greater than the first integer, the program will multiply them together, and display the product. If the user enters a negative number, the program will throw an exception, and tell the user than they entered a negative number.
The program should contain two functions: add() and multiply(). Make sure to prototype these functions.
The program should run until the user makes an entry that is not numeric. The output would look like this:
CAWindowslsystem321cmd.exe ter two nunbeers (or enter a letter to end he sun is 6 Enter two nunbers (or enter a letter to end he product is 8 Enter two nunbers Kor enter a letter to end ou entered a negative number Enter two nunbers Kor enter a letter to end ndStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started