Air Hockey | Problem - 45 | Beginner level | C language | CodeChef

 Link to the problem statement: https://www.codechef.com/submit/AIRHOCKEY

Solution: 

#include <stdio.h>

int main(void) {
int t, a, b;
scanf("%d",&t);
while(t--)
{
    scanf("%d %d", &a, &b);
    if(a>b)
    printf("%d\n", 7-a);
    else
    printf("%d\n", 7-b);
}
return 0;
}



Hope this will help you, if you want anything else leave a comment.

Thank you 

Comments

Popular posts from this blog

My very 1st contest! | Problem - 1 | Beginner level | C language | CodeChef

Implementing linked list in C language