Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- float x, y, z;
- float srednia(float a, float b, float c)
- {
- float s;
- s = ((a+b+c)/3);
- return s;
- }
- int main()
- {
- printf("Podaj liczbe x: ");
- scanf("%f", &x);
- printf("Podaj liczbe y: ");
- scanf("%f", &y);
- printf("Podaj liczbe z: ");
- scanf("%f", &z);
- printf("\nSrednia to: %.2f\n", srednia(x, y, z));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement