Skip to content

Instantly share code, notes, and snippets.

@gabrielcesar
Created July 21, 2016 14:36
Show Gist options
  • Save gabrielcesar/8489f2ebd993ae0d7cf6ec944b247d49 to your computer and use it in GitHub Desktop.
Save gabrielcesar/8489f2ebd993ae0d7cf6ec944b247d49 to your computer and use it in GitHub Desktop.
f) Average 2
/*
* f
* Average 2
*/
#include <stdio.h>
int main ( void )
{
float a;
float b;
float c;
scanf ( "%f", &a );
scanf ( "%f", &b );
scanf ( "%f", &c );
printf("MEDIA = %.1f\n",( ( ( a * 2 ) + ( b * 3 ) + ( c * 5 )) / ( 2 + 3 + 5 )));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment