Alright, i am trying to fix this loop problem but i cant understand whats wrong with it. In my eyes it should do the loop but it wont and i cant understand why.
Here is my whole code
#include <iostream>
using namespace std;
int main()
{
double in= 0;
cout << "Hur mycket du vill sätta in varje \x86r: ";
cin >> in;
}
cout << "Ditt sparmål uppnås efter " << year << " år" << endl;
cout << "Ditt saldo kommer att vara " << balance << " kr" << endl;
}
The program is made to ask you to enter a amount u save every year, then what your save goal is. and also at what interestrate you have, soo while i enter in 1000 into the "in" and take 5000 as a saving "goal" and just take 5 as interest.
it wont do the loop at all and i cant understand why. 0 is less then 5000 why wont it do the loop?
The semicolon terminates the while statement. Remove the semicolon.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.