Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int walk(int w1, int w2);
- int swim(int s);
- int fly(int f);
- int main(void)
- {
- int ma = 4, mb = 30, mc = 2000;
- mc += walk(ma + 6, mb + 7);
- printf("mc has a value of %d\n", mc);
- return 0;
- }
- int walk(int w1, int w2)
- {
- int a, b;
- b = swim(w2);
- a = fly(w1);
- return -b + a;
- }
- int swim(int s)
- {
- int c;
- c = s % 8;
- // point one
- return c;
- }
- int fly(int f)
- {
- int d;
- d = f * 12;
- // point two
- return d;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement