Advertisement
Alfoli

Recursividade: Exibição recursiva

Aug 14th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. //Forma recursiva
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. void exibe (int n){
  5.      if (n>0){
  6.               printf("%3d\n", n);
  7.               exibe (n-1);
  8.               }
  9.      }
  10.      
  11. main (){
  12.      int n=30;
  13.      exibe (n);
  14.      getchar();
  15.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement