Saturday, October 18, 2014

UVA-11727 (Cost Cutting) Easy

 

UVA-11727 (Cost Cutting) Easy

 

0001

#include<stdio.h>
int main()
{
int i,T,k=1,a,b,c;

scanf("%d",&T);
for(i=0; i<T; i++)
{
scanf("%d%d%d",&a,&b,&c);
if(a<b&&b<c)
{
printf("Case %d: %d\n",k,b);
}
else if(b<a&&a<c)
{
printf("Case %d: %d\n",k,a);
}
else if(a<c&&c<b)
{
printf("Case %d: %d\n",k,c);
}
else if(a>b&&b>c)
{
printf("Case %d: %d\n",k,b);
}
else if(b>a&&a>c)
{
printf("Case %d: %d\n",k,a);
}
else if(a>c&&c>b)
{
printf("Case %d: %d\n",k,c);
}
k++;
}
return 0;

}



UVA-11727 (Cost Cutting) Easy UVA Link

No comments:

Post a Comment