Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Simple Library
- *** mymean.h ***
- int mean(int, int);
- *** mymean.c ***
- extern void test(void);
- int mean(int a, int b){
- test();
- return (a+b)/2;
- }
- *** main.c ***
- #include <stdio.h>
- #include "mymean.h"
- int main(int argc, char* argv[]) {
- int v1, v2, m;
- v1 = 6;
- v2 = 4;
- m = mean(v1, v2);
- printf("The mean of %d and %d is %d\n", v1, v2, m);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment