Created
August 7, 2021 09:26
-
-
Save emadflash/2e6c75a5118be9b0942b5a2bfd90eccf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
void While(bool *func()) { | |
LOOP: | |
if (func()) { | |
goto LOOP; | |
} else { | |
goto DONE; | |
} | |
DONE: | |
return; | |
} | |
bool Cond() { | |
int i; | |
if (i < 10) { | |
printf("%d ", i++); | |
return true; | |
} | |
return false; | |
} | |
int main() { | |
int i = 0; | |
While(Cond); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment