Examlex

Solved

Write a Complete Program

question 5

Essay

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.


Definitions:

Statute of Limitations

A law prescribing the maximum period in which legal action can be taken regarding a particular event or offense after it occurred.

Patient Account

A record detailing a patient's treatments, transactions, and billing information with a healthcare provider.

Patient's Appreciation

A patient's expression of gratitude or thanks towards healthcare providers or healthcare services received.

Medical Office

A facility where medical professionals provide outpatient services, including diagnosis, treatment, and patient care.

Related Questions