C++:Printing Several Items Tutorial

From Progzoo
Jump to navigation Jump to search

Before you start you might want to look at:

[../ht25Tests/ if statement - testing strings and numbers]

[../ht05IO/ Formatting - displaying numbers and strings]

Which are the big countries by population?

  • The formatting has been done using C strings.

If you have a better way to do this please email me at a.cumming@napier.ac.uk

Give the name and population of the countries that have a population of at least 200000000 that is 200 million.

[Font] [Default] [Show] [Resize] [History] [Profile]

Calculate per captia GDP

Show the name and the per capita gdp for each country with a pop of more than 200000000

[Font] [Default] [Show] [Resize] [History] [Profile]

Sparse populations

Show the name only for those countries where the area is more than the population.

[Font] [Default] [Show] [Resize] [History] [Profile]

Population in millions

For the countries of South America, show the name and population divided by one million.

[Font] [Default] [Show] [Resize] [History] [Profile]