Answer to Question #94800 in C++ for Anonymous

Question #94800
Problem Statement:
Take user input for 2 numbers (num1 and num2). Write a program to perform the following operations:
Add = num1 + num2
Subtract = num1 - num2
Divide = num1 / num2
Modulus = num1 / num2
Multiply = num1 * num2
Find the greater of the 2 numbers, unless both numbers are equal (where you can display “numbers are equal”).

Note:
If a user enters a non-numeric entry (for any of the 2 numbers), exit the program with a message “Incorrect input, program exiting!!” displayed on screen.
The program should be able to accept any (both whole number and/or decimal, positive, negative etc.) numeric entries.
If one or more operations are not (mathematically) possible on the 2 numbers (e.g. 0/0), display a message, on screen, for the operation/operation(s), e.g. “Division - Operation not possible.”

Example Program Output
If the two numbers entered, by user, were 3 and 8. Display on screen
“Sum of” 3 “and” 8 “Is” 11
“Modulus of ” 3 “and” 8 “is” 3
“Greater number of” 3 “and” 8 “is” 8.
1
Expert's answer
2019-09-18T13:45:25-0400
Dear Anonymous, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS