Guest User

Untitled

a guest
Feb 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. double avg(double *a, double *b)
  3. {
  4. return (*a+*b)/2;
  5. }
  6.  
  7.  
  8. int main()
  9. {
  10. double x,y,z;
  11. printf("x="); scanf("%lf",&x);
  12. printf("y="); scanf("%lf",&y);
  13.  
  14. z=avg(&x,&y);
  15. printf("z=%lf\n", z);
  16. printf("Mission Complete!\n");
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment