SHARE
TWEET

hira

a guest Sep 22nd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5.     int t,i;
  6.     char str[10],ftr[10];
  7.     scanf("%d",&t);
  8.     for(i=0; i<t; i++)
  9.     {
  10.         scanf("%s %s",str,ftr);
  11.         if( (!strcmp(str,"APR")) || (!strcmp(str,"JUN")) || (!strcmp(str,"SEP")) || (!strcmp(str,"NOV")) )
  12.         {
  13.             if( (!strcmp(ftr,"SUN")) || (!strcmp(ftr,"MON")) || (!strcmp(ftr,"TUE")) || (!strcmp(ftr,"WED")))
  14.                 printf("8\n");
  15.             else if( (!strcmp(ftr,"FRI")) )
  16.                 printf("10\n");
  17.             else
  18.                 printf("9\n");
  19.         }
  20.         else if( (!strcmp(str,"JAN")) || (!strcmp(str,"MAR")) || (!strcmp(str,"MAY")) || (!strcmp(str,"JUL")) || (!strcmp(str,"AUG")) || (!strcmp(str,"OCT")) || (!strcmp(str,"DEC")) )
  21.         {
  22.             if( (!strcmp(ftr,"SUN")) || (!strcmp(ftr,"MON")) || (!strcmp(ftr,"TUE")) )
  23.                 printf("8\n");
  24.             else if( (!strcmp(ftr,"THU")) || (!strcmp(ftr,"FRI")) )
  25.                 printf("10\n");
  26.             else
  27.                 printf("9\n");
  28.         }
  29.         else
  30.         {
  31.             printf("8\n");
  32.         }
  33.     }
  34.     return 0;
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top