Last active
November 6, 2015 16:25
-
-
Save mirekfranc/c78602a2c0aaa386e92c to your computer and use it in GitHub Desktop.
just something to make CPU busy
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 <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