you will write a program that prompts the user for two integers and one of the 4 basic
mathematical operations. The only valid choices are: add, subtract, multiply, or divide (use true division and
not integer division). The user can type the operation using any combination of upper case and lower case
letters. If the user types in an operation that is not defined, the program should simply tell the user the
operation is not a valid operation (See sample run 1). Assuming the user’s operation is defined, you will
perform the operation, print the operands, print the operation (the way the user typed it), and the result. If the
second integer input is zero and the desired operation is division, don’t print the result, instead print that
“Division by zero is not allowed” (See sample run 2). After printing the result, display a line and print out any
of the three messages below that is true:
Both operands were negative
Both operands were positive
The result has three or more digits in it
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-70180.pdf
Comments
Leave a comment