Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- float first,second,third,med;
- printf("Entre com os tres valores :\n"); scanf("%f %f %f",&first,&second,&third);
- if ((first>=second)&&(first>=third)) med = (first*5 +2*(second+third))/3;
- if ((second>=first)&&(second>=third)) med = (second*5 +2*(first+third))/3;
- if ((third>=first)&&(third>=second)) med = (third*5 +2*(first+second))/3;
- printf("Media ponderada : %f\n",med);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment