Question: In my CSC class we are doing an if statement lab where we have to code in JAVA. The second problem is: When you first
In my CSC class we are doing an if statement lab where we have to code in JAVA.
The second problem is:
When you first learned to divide in elementary school, you expressed answers using a quotient and a remainder. For example, if you divided 7 by 2, your answer would be 3 remainder 1. Prompt the user to input two integers, determine which is larger and which is smaller, then divide the larger by the smaller and print the answer in quotient-remainder form. No remainder is to be printed if the remainder is zero. You will need two if-else statements for this problem.
WHAT IS THE CODE IN JAVA?

When you first learned to divide in elementary school, you expressed answers using a quotient and a remainder. For example, if you divided 7 by 2, your answer would be 3 remainder 1 Prompt the user to input two integers, determine which is larger and which is smaller, then divide the larger by the smaller and print the answer in quotient-remainder form. No remainder is to be printed if the remainder is zero. You will need two if-else statements for this problem 2. SAMPLE INPUT: 9 2 9 divided by 2 equals 4 remainder 1 SAMPLE INPUT: 3 15 15 divided by 3 equals5 SAMPLE INPUT: 9 24 24 divided by9 equals 2 remainder 6 TEST DATA: 17 3, 15 105, 51 17, 7 40
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
