Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int a=-1;
- int main(int n, int k)
- {
- if(a==-1)
- {
- a++;
- main(10,20);
- return a;
- }
- if(a!=-1)a+=k;
- if(n==1)return;
- main(n-1,k);
- }
- /* [liveuser@localhost ~]$ gcc recurmain.c && ./a.out */
- /* [liveuser@localhost ~]$ echo $? */
- /* 200 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement