Assignment: #ArithOps |
Due: 09/16/02018 |
Points: 3 |

## Specification

Prompt the user to enter an integer number.

Prompt the user to enter a C++ arithmetic operator (i.e.

`). Print an error message and exit the program if the user enters an invalid operator.`

+ - / * %Prompt the user to enter another integer number. If the arithmetic operator is divide, then print an error message and exit the program if this integer input is 0.

Print the result obtained when the arithmetic operator is applied to the entered numbers. If the result is a quotient, then print a warning message that integer arithmetic was executed.

## Example Outputs

The angle brackets are a notation used to represent user inputs. For example,

`implies the user entered an 8.`

<8>enter an integer: <3> enter arithmetic operator: <+> enter an integer: <5> 3 + 5 = 8 enter an integer: <2> enter arithmetic operator: <*> enter an integer: <7> 2 * 7 = 14 enter an integer: <7> enter arithmetic operator: </> enter an integer: <0> *** error: cannot divide by zero enter an integer: <5> enter arithmetic operator: </> enter an integer: <2> 5 / 2 = 2 (warning: integer division executed) 5 / 2 = 2.5