Advertisement
AquaBlitz11

[t011] Countup

Oct 9th, 2018
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void countup(int n)
  4. {
  5.     if (n == 0)
  6.         return;
  7.     countup(n-1);
  8.     printf("%d\n", n);
  9. }
  10.  
  11. int main()
  12. {
  13.     int n;
  14.     scanf("%d", &n);
  15.     countup(n);
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement