Write a complete program. Prompt the user for two integers (using Scanner). Assume that the user will enter two well-formatted integers. You do not have to check for that. They should both be greater than or equal to 0 and the first one must be strictly less than the second one; if this is not the case, output WRONG DATA. If that is the case, calculate the exact ratio of the first number divided by the second number (for example, if the numbers are 6 and 10, the ratio is 0.6; if the numbers are 4 and 10, the ratio is 0.4). If that ratio is strictly greater than 0.5, output ABOVE AVERAGE; if it is equal to 0.5 (do not worry about possible rounding errors), output AVERAGE; if it is less than 0.5, output BELOW AVERAGE.
Correct Answer:
Verified
public class Q...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q21: Complete the code, drawing a solid cyan
Q22: Complete this code. Assume that you have
Q23: A String variable named s has been
Q24: Assume that we have already declared an
Q25: Assume that we have already declared a
Q27: A String variable named s has been
Q28: Assuming a and b are int variables,
Q29: Write a loop to output the word
Q30: Write a loop to calculate the total
Q31: Inside the main method, prompt the user
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents