3.5

#include<iostream>

int main()
{
	using namespace std;
	
	long long world_population, American_population;

	cout << "Enter the world's population: ";
	cin >> world_population;
	cout << "Enter the population of the US: ";
	cin >> American_population;

	float percent_of_population = (double(American_population) / world_population)*100;
	cout << "The population of hte US is " << percent_of_population << '%' << " of the world population.\n";

	return 0;

}

你可能感兴趣的:(C++)