Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int a=-1;
  4.  
  5. int main(int n, int k)
  6. {
  7.   if(a==-1)
  8.     {
  9.   a++;
  10.   main(10,20);
  11.   return a;
  12.     }
  13.   if(a!=-1)a+=k;
  14.   if(n==1)return;
  15.   main(n-1,k);
  16. }
  17.  
  18. /* [liveuser@localhost ~]$ gcc recurmain.c && ./a.out */
  19. /* [liveuser@localhost ~]$ echo $? */
  20. /* 200 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement