#include<iostream>
using namespace std;
int main()
{
int t, a, b, c, i;
while(cin >> t && t < 20)
{
for(i=1; i<=t; i++)
{
cin >> a >> b >> c;
if(a>b && a<c || a < b && a > c)
{
cout << "Case " << i << ": " << a << endl;
}
else if(b>a && b < c || b<a && b > c)
{
cout << "Case " << i << ": " << b << endl;
}
else
{
cout << "Case " << i << ": " << c << endl;
}
}
}
return 0;
}
using namespace std;
int main()
{
int t, a, b, c, i;
while(cin >> t && t < 20)
{
for(i=1; i<=t; i++)
{
cin >> a >> b >> c;
if(a>b && a<c || a < b && a > c)
{
cout << "Case " << i << ": " << a << endl;
}
else if(b>a && b < c || b<a && b > c)
{
cout << "Case " << i << ": " << b << endl;
}
else
{
cout << "Case " << i << ": " << c << endl;
}
}
}
return 0;
}
Comments
Post a Comment