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:

Romantic Relationships

Interpersonal bonds characterized by love, affection, and commitment between partners.

Attachment Style

A pattern of emotional bonds and behaviors developed from early life interactions, influencing relationships in adulthood.

Stability

The quality or state of being resistant to change, maintaining the same condition, or returning to a baseline state after being disturbed.

Infancy

Refers to the earliest stage in human life, spanning from birth to the age of two, characterized by rapid physical and cognitive development.

Related Questions