Skip to content

Instantly share code, notes, and snippets.

@mirekfranc
Last active November 6, 2015 16:25
Show Gist options
  • Save mirekfranc/c78602a2c0aaa386e92c to your computer and use it in GitHub Desktop.
Save mirekfranc/c78602a2c0aaa386e92c to your computer and use it in GitHub Desktop.
just something to make CPU busy
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
long from, i, j = 20L;
if (argc > 1)
from = atol (argv[1]);
else
from = 20L;
for (i = 1L; j; ++i)
{
for (j = from; j > 0L; --j)
if (i % j)
break;
}
printf ("%ld\n", --i);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment