Welche Schleifen Typen kennt ihr?
-
Sers,
welche Schleifen kennt ihr und wie ist die Syntaxfor(INIT, AUSWERTUNG, BERECHNUNG) { /* CODE / }
while(AUSWERTUNG) { / CODE / }
do{ / CODE */ } while(AUSWERTUNG)was kennt ihr noch und aus welchen Programmiersprachen?
-
foreach
-
goto-Spagatti-Schlefie
-
Die Endlosschleife:
#define forever goto loop; loop: printf( "Hello World!\n" ); forever
-
a: cli jmp a
-
infinite wisdom schrieb:
Die Endlosschleife:
#define forever goto loop; loop: printf( "Hello World!\n" ); forever
#include <reallyverylargebigintlongint.h> REALLYVERYLARGEBIGINTLONGINT infinity(REALLYVERYLARGEBIGINTLONGINT i = 0) { if(i == infinity_end()) return i; else return (REALLYVERYLARGEBIGINTLONGINT) infinity(i+1); } REALLYVERYLARGEBIGINTLONGINT infinity_end() { return infinity(); } while(infinity() <= infinity_end()) { printf( "Hello World!\n" ); }