Problem Code: FLOW017

/I am confident that my answer is correct but when i was submitted this answer.it was showing wrong answer/

#include<stdio.h>
int main()
{
int a,b,c,t,i;
scanf("%d",&t);
for(i=0;i<t;i++)
{
scanf("%d%d%d",&a,&b,&c);
if(a>b&&a>c)
{
if(b>c)
printf("%d",b);
else
printf("%d",c);
}

        if(b>a&&b>c)
            {
                if(a>c)
                    printf("%d",a);
                else
                    printf("%d",c);
            }

        if(c>a&&c>b)
        {
            if(a>b)
                printf("%d",a);
                else
                printf("%d",b);

        }
        }

return 0;
}

Your solution won’t give any output when two of the numbers are same and both are greater than third one.
Also when all the given entries are same.

check for the test case 40 40 13 and 40 40 40. I hope you will get it.

here is thee link to accepted solution : https://www.codechef.com/viewsolution/15558135

1 Like

Thanks, man.Yes, I got it.