#include<iostream>
int main()
{
long long world_p, usa_p;
cout << "Enter the world's population: ";
cin >> world_p;
cout << "Enter the population of US: ";
cin >> usa_p;
cout << "The population of the US is " << double(usa_p) / world_p * 100 << "% of the world population.";
cin.get();
cin.get();
return 0;
}
运行结果: