Skip to content

Instantly share code, notes, and snippets.

@nibrahim
Created May 9, 2021 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nibrahim/e9a00a76d471f2d54d60fa63eb4c7ae1 to your computer and use it in GitHub Desktop.
Save nibrahim/e9a00a76d471f2d54d60fa63eb4c7ae1 to your computer and use it in GitHub Desktop.
Example program for Genskill training.
#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