Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1. int registeredAP(FILE* fp, int area, const char publisher[])
  2. {
  3.         char publisher_low[8], publisher_high[8];
  4.         int area_in_file, min_digits;
  5.         min_digits = minNoDigits(fp,area);
  6.         rewind(fp);
  7.         while (fscanf (fp,"%d %s %s",&area_in_file, &publisher_low, &publisher_high) != EOF)
  8.         {
  9.                 if (area_in_file == area && (strlen(publisher) >= min_digits) && (atoi(publisher) >= atoi(publisher_low) && atoi(publisher) <= atoi(publisher_high)) && strlen(publisher)==strlen(publisher_low) && strlen(publisher) == strlen(publisher_high))
  10.                 {
  11.                         return 1;
  12.                 }
  13.        }
  14.        return 0;
  15. }
  16. tr0picana ftw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement