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...


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.



Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here