URI Problem 1914 (Whose Turn Is It) solution( Bangla ) | C language

**Before watching this make sure that you’ve tried enough**

#include<stdio.h>
#include<string.h>
int main()
{
    int i,n;
    long long int a,b;
    char str1[101],str2[6],str3[101],str4[6];
    scanf("%d",&n);
    for(i = 0;i < n;i++){
        scanf("%s %s %s %s",str1,str2,str3,str4);
        scanf("%lld %lld",&a,&b);
        a += b;
        if(str2[0]=='I'){
            if(a%2==0)printf("%s\n",str3);
            else printf("%s\n",str1);
        }
        else{
            if(a%2==0)printf("%s\n",str1);
            else printf("%s\n",str3);
        }
    }

    return 0;
}

 

If this solution helped you, please share this with your friends.
And if you have anything to say, let me know in the comment section.

More solutions are coming so Like our Facebook page and Subscribe to our YouTube channel to stay connected.

Leave a Comment