Compiler being used: Dev-C++
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
int start_time = GetTickCount(); //i want this to happen once
int end_time, total_time;
while(true)
{
end_time = GetTickCount();
total_time = (end_time - start_time)/ 10;
cout << 200 << endl
<< total_time << endl;
if(total_time == 200) //for some reason, this if statement gets ignored?
{
cout << "Perfect" <<endl;
system("PAUSE");
return 0;
}
else if(total_time > 200)
{
cout << "WHAT THE F-" << endl;
Sleep(10000);
return 0;
}
system("cls");
}
system("PAUSE");
return 0;
}
This post has been edited by Pat234: 17 January 2009 - 10:24 PM

New Topic/Question
Reply



MultiQuote




|