Advertisement
sujonshekh

Q1. X

Sep 2nd, 2016
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. Q1. X
  2.  
  3. #include<stdio.h>
  4.  
  5. recursion(int num, int n)
  6. {
  7.     if(num > 100000)
  8.     {
  9.         return;
  10.     }
  11.     printf("%d+",num);
  12.     recursion(num*n,n);
  13. }
  14.  
  15. int main()
  16. {
  17.     int n;
  18.     scanf("%d",&n);
  19.     recursion(n,n);
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement