Advertisement
Mary_99

ex1.3

Nov 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6. //arithmetic average of any two numbers
  7. float a, b;
  8. printf("a =");
  9. scanf("%f",&a);
  10. printf("b =");
  11. scanf("%f",&b);
  12. float c;
  13. c = (a + b)/2; // c = average
  14. printf("%f", c);
  15.   return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement