Java Write an application that prompts the user for two integers and then prompts the user to enter an option as follows: 1 to add the two integers, 2 to subtract the second integer from the first, 3...


Java<br>Write an application that prompts the<br>user for two integers and then prompts<br>the user to enter an option as follows: 1<br>to add the two integers, 2 to subtract the<br>second integer from the first, 3 to<br>multiply the integers, and 4 to divide the<br>first integer by the second. Display an<br>error message if the user enters an<br>option other than 1 through 4 or if the<br>user chooses the divide option but<br>enters 0 for the second integer.<br>Otherwise, display the results of the<br>arithmetic. Write your .java file here.<br>Include your flowchart and sample<br>output.(Use a switch statement only)<br>

Extracted text: Java Write an application that prompts the user for two integers and then prompts the user to enter an option as follows: 1 to add the two integers, 2 to subtract the second integer from the first, 3 to multiply the integers, and 4 to divide the first integer by the second. Display an error message if the user enters an option other than 1 through 4 or if the user chooses the divide option but enters 0 for the second integer. Otherwise, display the results of the arithmetic. Write your .java file here. Include your flowchart and sample output.(Use a switch statement only)

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here