7 char buffer [MAX_CHAR+1];
8 char solution [MAX_CHAR+1];
10 int main(int argc, char ** argv)
14 int diff, mindiff = INT_MAX;
16 /**Grenzen weather: 7 13
20 if (argc != 4) exit (1);
21 for (i=0; i< 2; i++) val[i] = atoi(argv[i+2]);
24 in = fopen (argv[1],"r");
25 if (in == NULL) exit (1);
27 while (fgets(buffer, MAX_CHAR, in) != NULL)
29 max = atoi(&buffer[val[0]-1]);
30 min = atoi(&buffer[val[1]-1]);
32 if (diff < mindiff && diff != 0)
35 strcpy (solution, buffer);
38 printf ("%s\n", solution);