Skip to content

Instantly share code, notes, and snippets.

@m4hi2
Created April 5, 2017 20:10
Show Gist options
  • Select an option

  • Save m4hi2/b8046bd517615abdeddd06d4da9eae38 to your computer and use it in GitHub Desktop.

Select an option

Save m4hi2/b8046bd517615abdeddd06d4da9eae38 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main() {
float a,b,c,med;
scanf("%f%f%f", &a, &b, &c);
med = ((a*2) + (b*3)+(c*5)) / (2+3+5);
printf("MEDIA = %.1f\n", med);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment