Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void) {
- long long int num_datasets;
- scanf("%llu", &num_datasets);
- //test that unsigned long long num_datasets is being stored correctly
- //printf("%llu",num_datasets);
- int zackHere;
- int mackHere;
- int datasetCount;
- int datasetMemberCount;
- long long int currNum;
- while (datasetCount<num_datasets)
- {
- datasetMemberCount=0;
- zackHere=0;
- mackHere=0;
- while (datasetMemberCount<10)
- {
- scanf("%llu",&currNum);
- printf("%llu ",currNum);
- if(currNum==18)
- {
- mackHere=1;
- }
- if(currNum==17)
- {
- zackHere=1;
- }
- datasetMemberCount++;
- }
- if(zackHere==1&&mackHere==1)
- {
- printf("\nboth\n\n");
- }
- else if(zackHere==1)
- {
- printf("\nzack\n\n");
- }
- else if(mackHere==1)
- {
- printf("\nmack\n\n");
- }
- else
- {
- printf("\nnone\n\n");
- }
- datasetCount++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement