Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- char name1[100],name2[100],choice1[100],choice2[100];
- int a,b,i,n,sum;
- scanf("%d",&n);
- for(i=0;i<n;i++)
- {
- gets(name1);
- gets(choice1);
- gets(name2);
- gets(choice2);
- scanf("%d%d",&a,&b);
- sum=a+b;
- if(choice1[0]=='P' &&choice1[1]=='A'&&choice1[2]=='R')
- {
- if(sum%2==0)
- printf("%s",name1);
- }
- if(choice2[0]=='P' &&choice2[1]=='A'&&choice2[2]=='R')
- {
- if(sum%2==0)
- printf("%s",name2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement