Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdio> //for printf()
- using namespace std;
- int main()
- {
- float a, b, c, media;
- cin >> a;
- cin >> b;
- cin >> c;
- media = (a*2 + b*3 + c*5) / (2+3+5);
- printf("MEDIA = %.1f\n", media); //new line for presentation error
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement