Question: Hello, I would like help answering this Java question. I am suppose to answer using if - else Statements as a beginner. Please explain in

Hello, I would like help answering this Java question. I am suppose to answer using if - else Statements as a beginner. Please explain in detail what you do.

Here is the question:

Hello, I would like help answering this Java question. I am suppose

Write a program that prompts the user for two int values. If the two values have the same remainder when divided by 5, then return the smaller of the two values. However, in all cases, if the two values are the same, return 0. Otherwise, return the largest of the values. Execution 1: Input integer 1: 6 Input integer 2:2 Result: 6 Execution 2: Input integer 1:2 Input integer 2: 7 Result: 2 Execution 3: Input integer 1:7 Input integer 2:7 Result: 0

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!