//
#include <iostream>
#include <windows.h> // including the windows library for the Sleep command
using 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;
Последний раз редактировалось BlacKAndWh1te; 13.08.2010 в 13:23.
Причина: Добавлено сообщение