Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- #include<stdlib.h>
- #include<math.h>
- float myAvg(float num1, float num2); //func proto
- int main()
- {
- float a=3.1, b=3.5;
- printf("The avg is %f", myAvg(a,b) );
- return 0;
- }
- float myAvg(float num1, float num2)
- {
- float answer;
- answer=(num1 + num2)/2;
- return answer;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement