9 char buffer [MAX_CHAR+1];
10 char solution [MAX_CHAR+1];
12 int main(int argc, char ** argv)
16 int diff, mindiff = INT_MAX;
18 /**Grenzen weather: 7 13
22 if (argc != 4) exit (1);
23 for (i=0; i< 2; i++) val[i] = atoi(argv[i+2]);
26 in = fopen (argv[1],"r");
27 if (in == NULL) exit (1);
29 while (fgets(buffer, MAX_CHAR, in) != NULL)
31 max = atoi(&buffer[val[0]-1]);
32 min = atoi(&buffer[val[1]-1]);
34 if (diff < mindiff && diff != 0)
37 strcpy (solution, buffer);
40 printf ("%s\n", solution);
47 [[!tag CategoryCodeSnippets]]