Problem Type : Ad hoc
#include<stdio.h>
int main()
{
double c,d,c2,c3;
int n,i;
while(scanf("%d",&n)==1)
{
for(i=1; i<=n; i++)
{
scanf("%lf%lf",&c,&d);
c2=((5*d)/9);
c3=c+c2;
printf("Case %d: %.2lf\n",i,c3);
}
}
return 0;
}
#include<stdio.h>
int main()
{
double c,d,c2,c3;
int n,i;
while(scanf("%d",&n)==1)
{
for(i=1; i<=n; i++)
{
scanf("%lf%lf",&c,&d);
c2=((5*d)/9);
c3=c+c2;
printf("Case %d: %.2lf\n",i,c3);
}
}
return 0;
}
No comments:
Post a Comment