Write a Java program to compare the populations of two states.
(1) Ask the user to input the name of the first state
(2) Ask the user to input the population of the first state (must be the integer type)
(3) Ask the user to input the name of the second state
(4) Ask the user to input the population of the second state (must be the integer type)
(5) Compute the ratio of the first state’s population compared to that of the second state (the ratio value should be decimal point value like 0.72, 2.35 etc.).
(6) Print out the comparison results: The population of State XXX is XXX times of State XXX.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here