Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int foo(int number);
- ////////////////////////////////////////////////
- int main()
- {
- int a;
- a = foo(10);
- printf("Position of Frog = %d \n", a);
- }
- ////////////////////////////////////////////////
- int foo(int number) //
- {
- int n = 0;
- if (number <= 5)
- {
- n = number;
- return n;
- }
- if(number <= 10)
- {
- number -= 5;
- return 5 - number;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement