#include<stdio.h>
int main()
{
int a, b, c, i, n, j;
while(scanf("%d", &n)!= EOF && n<20)
{
j = 0;
for(i=1; i<=n; i++)
{
scanf("%d %d %d", &a, &b, &c);
if((a>b && a<c) || (a<b && a>c))
{
j++;
printf("Case %d: %d\n", j, a);
}
else if((b>a && b<c) || (b<a && b>c))
{
j++;
printf("Case %d: %d\n", j, b);
}
else
{
j++;
printf("Case %d: %d\n", j, c);
}
}
}
return 0;
}
int main()
{
int a, b, c, i, n, j;
while(scanf("%d", &n)!= EOF && n<20)
{
j = 0;
for(i=1; i<=n; i++)
{
scanf("%d %d %d", &a, &b, &c);
if((a>b && a<c) || (a<b && a>c))
{
j++;
printf("Case %d: %d\n", j, a);
}
else if((b>a && b<c) || (b<a && b>c))
{
j++;
printf("Case %d: %d\n", j, b);
}
else
{
j++;
printf("Case %d: %d\n", j, c);
}
}
}
return 0;
}
Comments
Post a Comment