Question: Write a Java program that: (1) Prompts a user to enter two numbers between 200 and 1000 and a symbol for operation such as +,
Write a Java program that: (1) Prompts a user to enter two numbers between 200 and 1000 and a symbol for operation such as +, -, *, and / (use Scanner for input). (2) Code uses nested if statement or switch to perform the operation on the two numbers (3) If the provided symbol is valid, displays the input data along with the result of the calculation to the console. Otherwise displays an error message For example, for input: 700 950 + the calculation is addition and the result will be 1650 Note 1: To read a single character by Scanner, you can read in as a string and then use the first character. For example: scan.next().charAt(0) Note
2: Be careful you do not have integer division Note
3: If the user inputs an invalid symbol, print an error message only
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
