Hi im kinda new to C++ and im trying to write a program for a challenge site (osix.net), but i seem to be running into problems with my loop which wont even seem to run once...
If i take out the line TimePass++; the loop works but doesn't end......Code:#include <iostream>
using namespace std;
double Perm = 3;
int TimeTotal = 94;
int TimePass = 0;
int main()
{
while (TimePass < TimeTotal)
{
Perm = Perm * (1+1/3);
TimePass++;
}
cout << (int)Perm;
}
any help is appreciated!