Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- double avg(double *a, double *b)
- {
- return (*a+*b)/2;
- }
- int main()
- {
- double x,y,z;
- printf("x="); scanf("%lf",&x);
- printf("y="); scanf("%lf",&y);
- z=avg(&x,&y);
- printf("z=%lf\n", z);
- printf("Mission Complete!\n");
- return 0;
- }
Add Comment
Please, Sign In to add comment