Problem:
https://www.urionlinejudge.com.br/judge/en/problems/view/1006
Solution:
It also use weighted average/mean
You can check this link for weighted mean http://www.mathsisfun.com/data/weighted-mean.html
Weighted Mean = | Σwx |
Σw |
#include<stdio.h> int main() { double a,b,c,result; scanf("%lf %lf %lf",&a,&b,&c); result=((a*2)+(b*3)+(c*5))/(2+3+5); printf("MEDIA = %.1lf\n",result); return 0; }