![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
#include <stdlib.h>#include <stdio.h>
Include dependency graph for gen_input.cpp:Go to the source code of this file.
Functions | |
| int | main (int argc, char *argv[]) |
| Generates sample input for square.cpp. | |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 33 of file gen_input.cpp.
{
long num = argc>1 ? atol(argv[1]) : 1000000;
int a=0;
int b=1;
for( long j=0; j<num; ++j ) {
printf("%u\n",a);
b+=a;
a=(b-a)%10000;
if (a<0) a=-a;
}
return 0;
}
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.