Alright, so I'm using bloodshed Dev-C++ but I don't think that's the problem. I'm trying to make a short program that will summarize how much money in USD I will have when I finish working here in China. I think the problem lies within my source code...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
usingnamespace std;
int main()
{
double yuan;
double dollar;
double months;
dollar = 68275;
yuan = 1465;
cout << "How long will you live in China? How many months?" << endl;
cin >> months;
cout << "How much money do you make each month?" << endl;
cin >> yuan;
cout << "You will have " << (months * yuan) * dollar << " dollars when you go back to America." << endl;
system("PAUSE");
return 0;
}
for the first cin, I punch in "36" in the console.
Then when it asks how much money I make each month, I punch in "12000" (chinese yuan).
at line 10, you define yuan. At line 14, you ask the user to input it again. Also, you're missing a decimal when you define dollar at line 7, hence the gigantic numbers.