cout statement not working....i think...
ahhh...yeah this is really stupid but why is my program outputting zero for the variable pop?
Code:
#include <iostream>
int main(void){
using namespace std;
//capture data
cout << "Enter the world's population: ";
long worlds_pop; cin >> worlds_pop;
cout << "Enter the u.s. population: ";
long us_pop; cin >> us_pop;
//operate on data
long pop = us_pop/worlds_pop;
//ouput results
cout << "The United States population is ";
cout << pop << " % of the worlds population.";
cout << endl;
return 0;
}
edit: yeah, it's obviously not std::cout, but I'm thinking its the way I'm operating on long?