URI Online Judge Solution| 1005 Average 1

Problem:
https://www.urionlinejudge.com.br/judge/en/problems/view/1005

Solution:

It actually use weighted average/mean
You can check this link for weighted mean   http://www.mathsisfun.com/data/weighted-mean.html

#include<stdio.h>
int main(){
float a,b,result;
scanf("%f %f",&a,&b);
result=((a*3.5)+(b*7.5))/(3.5+7.5);
printf("MEDIA = %.5f\n",result);
return 0;
}

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published.