Created
May 9, 2021 17:56
-
-
Save nibrahim/e9a00a76d471f2d54d60fa63eb4c7ae1 to your computer and use it in GitHub Desktop.
Example program for Genskill training.
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> | |
void delay( unsigned int value) | |
{ | |
unsigned int count1 =0; | |
unsigned int count2 = 0; | |
for(count1 = 0; count1 < value ; count1++ ) | |
{ | |
for(count2 = 0; count2 < count1 ; count2++ ) | |
{ | |
} | |
} | |
} | |
const char rocket[] = | |
" ^ \n\ | |
/^\\\n\ | |
|-|\n\ | |
| |\n\ | |
|I|\n\ | |
|S|\n\ | |
|R|\n\ | |
|O|\n\ | |
/| |\\\n\ | |
/ | | \\\n\ | |
| | | |\n\ | |
`-\"\"\"-`\n\ | |
"; | |
int main() | |
{ | |
int jumpControlAtBottom = 0; | |
const int someDelay = 6000; | |
int shifControl = 0; | |
for (jumpControlAtBottom = 0; jumpControlAtBottom < 30; ++jumpControlAtBottom) | |
{ | |
printf("\n"); | |
} | |
fputs(rocket,stdout); | |
for (shifControl = 0; shifControl < 30; ++shifControl) | |
{ | |
delay(someDelay); | |
printf("\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment