Herzlich Willkommen, lieber Gast!
  Sie befinden sich hier:

  Forum » C / C++ (WinAPI, Konsole) » Langsame Schleife

Forum | Hilfe | Team | Links | Impressum | > Suche < | Mitglieder | Registrieren | Einloggen
  Quicklinks: MSDN-Online || STL || clib Reference Grundlagen || Literatur || E-Books || Zubehör || > F.A.Q. < || Downloads   

Autor Thread - Seiten: > 1 <
000
26.01.2005, 13:10 Uhr
Havoc



Hoi,


Ich habe gerade Informatik wo wir z.Z eine C++ Schleife machen:

Die funzt auch ganz toll aber jetzt will unser Lehrer das er langsamer hochzählt: sprich das er zwischen jeder Zahl ne pause macht (z.B 2 sekunden)


#include <iostream.h>

int main()
{
int i=1;

while (i<=100)
{
cout << i <<endl;
i=i+1;
}
return 0;
}


Thx schon ma

MfG Havoc
 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
001
26.01.2005, 13:21 Uhr
Diablo



hi!!
so gehts:

C++:
#include <iostream.h>
#include <windows.h>

int main()
{
int i=1;

while (i<=100)
{
cout << i <<endl;
i=i+1;
Sleep(2000);
}
return 0;
}

 
Profil || Private Message || Suche Download || Zitatantwort || Editieren || Löschen || IP
Seiten: > 1 <     [ C / C++ (WinAPI, Konsole) ]  


ThWBoard 2.73 FloSoft-Edition
© by Paul Baecher & Felix Gonschorek (www.thwboard.de)

Anpassungen des Forums
© by Flo-Soft (www.flo-soft.de)

Sie sind Besucher: