Question: Write a conditional program using if-else statements IN JAVA that: Reads two numbers, and displays the division of the two numbers . If the user
Write a conditional program using if-else statements IN JAVA that:
- Reads two numbers, and displays the division of the two numbers.
- If the user entry for the second number is 0, the program will display the following output: Division by 0!, otherwise the program will display the output result of the division!
- Compile and run below program that starts out with mport java.util.Scanner; // Declaring class task2 public class Task2 { public static void main(String[] args) {
- Make sure to click on the Output Window to input the first number and the second number.
- Test the program by entering different numbers.
- Take notes of below program to remember your observations and include your notes in your program comments.
- Submit your work.
- Notes: Dont forget to input the two data in the input console.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
