Hello, this is my second ever attempt at writing a program. It is essentially a model of an economics paper I wrote. However, when I run it, after I enter the tax value it skips all the other inputs and then delivers an output.
What I am missing?
using namespace std;
int main(int nNumberofArgs, char* pszArgs)
// Enter the tax
cout << "Enter the tax rate [0,1]: "
cin >> tax;
// Enter the gdp (millions)
cout << "Enter the gdp level (millions): "
cin >> gdp;
// Enter the population (millions)
cout << "Enter the population (millions: ";
cin >> pop;
// Enter the inflation rate
cout << "Enter the inflation rate: ";
cin >> inflation;
// Enter the openness
cout << "Enter the openness rate [0,1]: ";
cin >> open;
intercept = 1.079;
// Calculate FDI
fdi = intercept + tax * 2.24 + gdp * 1.786 + pop * 0.002 + inflation * -0.048 + open * 0.029;
// Output the results (followed by NewLine)
cout << "Fdi is: ";
cout << fdi << endl;
// wait until user is ready before terminating program
// to allow the user to see the program results