We can use arithmetic operators to perform calculations with values in programs. Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra. A value used on either side of an operator is called an operand. For example, in below statement the expressi...
Result:The result is displayed after performing the calculation. Invalid Input:The default case of the switch block handles invalid operators and informs the user. Java Code Editor: