Sunday, June 19, 2016

SOLUTION OF URI 1079


//  1079   (Mahmud_Jamil) BRUR
//  Weighted Averages


#include<stdio.h>
int main()
{
    float a,b,c,total,ave;
    int i,n;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        scanf("%f%f%f",&a,&b,&c);
        total=a*2.0+b*3.0+c*5.0;
        ave=total/10.0;
        printf("%.1f\n",ave);
    }
    return 0;
}







0 comments:

Post a Comment