Skip to content

Instantly share code, notes, and snippets.

@farcaller
Created October 24, 2009 18:05
Show Gist options
  • Save farcaller/217645 to your computer and use it in GitHub Desktop.
Save farcaller/217645 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <unistd.h>
int main (int argc, const char *argv[])
{
int i, j;
const char *scroller = "|/-\\|/-\\";
j = 0;
for(i=0; i<20; ++i) {
printf("%c", scroller[j]);
fflush(stdout);
sleep(1);
printf("\b");
++j;
if(j>8) j=0;
}
printf("\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment