1006 - Average 2

Problem Link


A Solution in c


#include<stdio.h>
int main()
{
    float A, B,C, MEDIA;
    scanf("%f %f %f", &A, &B, &C);
    MEDIA =((A * 2)+(B * 3)+(C * 5))/(2 + 3 + 5);
    printf("MEDIA = %.1f\n", MEDIA);
    return 0;
}





No comments

Theme images by Jason Morrow. Powered by Blogger.