fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void imprimir_arreglo(int B[], int idx, int size){
  6.  
  7. cout << B[idx] << " ";
  8. if(idx + 1 < size){
  9. imprimir_arreglo(B, idx + 1, size);
  10. }
  11. }
  12.  
  13. int main() {
  14.  
  15. int A[5] = {3, 7, 8, 2, 1};
  16.  
  17. imprimir_arreglo(A, 0, 5);
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5304KB
stdin
Standard input is empty
stdout
3 7 8 2 1