Created
February 20, 2020 13:48
-
-
Save artob/c27dc4387292b9e63fd5a2999afa89aa to your computer and use it in GitHub Desktop.
This file contains 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 <cstdio> // for printf() | |
#include <unistd.h> // for sleep() | |
int number = 0; | |
void setNumber() { | |
printf("%d\n", number); | |
} | |
void loop() { | |
setNumber(); | |
sleep(1); | |
number = (number + 1) % 10; | |
}; | |
int main(void) { | |
while (1) { | |
loop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment