Gonzalez Posted October 19, 2009 Report Posted October 19, 2009 // #include <iostream>#include <windows.h> // including the windows library for the Sleep commandusing namespace std;int main(){ int iFinal, iNumber; bool szContinue; // Bool is used for "true" or "false" statements iNumber = 0; iFinal = 0; szContinue = true; while(szContinue) { if(iNumber < 1000000000) // this means while iNumber is less than 500 loop aga { iFinal = iFinal +1; iNumber = iNumber + 1; printf("%d \n", iFinal); Sleep(1); // Sleeps or waits 250 ms } else // Else means when iNumber hits 500 it will stop { szContinue = false; } } cin.get(); return 0; Quote