interactive program, sumone plz solve it

Write an interactive program that asks the user for the population of a country,and replies with how many percent of the world population lives in this country. Assume that the world has 7700 million people and, to save typing, ask for the population in millions as well.Your program could for example look like this:
How many people live in the country (in millions)? 10
The country has 0.12987 percent of the world population.
Write your question here.

This should help you :

"7700 - 100 %
10 - x %"
can u write whole program structure
thanks
Hello asadsaleem111,

The people here do not do your work for you. If you post what you have done and point out where you have a problem you can get help with what you do not understand.

There is not that much to the program. Start by creating some variables and getting the user input. The math is simple math.

Andy
Try solving this in 3 steps.

First write a program that prompts for the number of people who live in the country and prints out the number that you entered (so you're sure that you read it correctly).

Second, work out the math on paper to compute the country's percent of world population. Make sure that your formula works for the example given.

Third, modify your program to compute the percent population and print the result.
Topic archived. No new replies allowed.