Question: 1. Using java, keep prompting the user to input a character (a loop is needed) as long as the character is not q. If the

1. Using java, keep prompting the user to input a character (a loop is needed) as long as the character is not q. If the character is + , - , * , or %, then prompt the user to input two integers; other wise, output error message and prompt for another character.
2. Display the result of the arithmetic operation if the character is one of the five arithmetic operators.
 1. Using java, keep prompting the user to input a character

(1) Keep prompting the user to input a character (a loop is needed) as long as the character is not q If the characteris *.of then prompt the user to enter two integers; otherwise, output error message and promot for anther character (6 pts) Enter a character: Enter 2 integers: 2 5 Enter a character: t Invalid operator t Enter a character: Enter a character:q program ended (2) Displays the result of the arithmetic operation if the character s one of the five arithmetic operators(4 pts) Enter a character:t Enter 2 integers: 2 5 2+5=7 Enter a character: Enter 2 integers: 2 5 2-5 =-7 Enter a character: q program ended

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!