#include #include #include FILE *in,*out; main( int argc, char *argv[] ) { extern char *optarg; extern int optind,opterr,optopt; int opcion; int i,j; int first,step,last; int number,idx; char line[1024]; in = stdin; out = stdout; first = 1; step = 1; last = 1000000; number = 0; while ( (opcion=getopt(argc,argv,"f:l:s:n")) != EOF) { switch(opcion) { case 'f': first = atoi(optarg); break; case 'l': last = atoi(optarg); break; case 's': step = atoi(optarg); break; case 'n': number = 1; break; default: fprintf(stderr, "Uso: %s [-n][-f first][-l last][-s step]\n", argv[0]); exit(1); } } first = (first < 1 ? 1 : first); step = (step < 1 ? 1 : step); last = (last < first ? first : last); if (optind