Advertisement
Grossos

Recursive Function Of Numbers In Array

Apr 3rd, 2017
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int recursive(int n);
  4.  
  5. int recursive()
  6. {
  7.      const int N=5;
  8.  
  9.    int arr[N]= { 3, 2, 1, 6, 7 };
  10.        for(int i=0;i<5;i++)
  11.  
  12.           cout<<" arr["<<N-5<<"]"<<"="<<*(arr+i);
  13.           cout<<endl;
  14.  return 1;
  15. }
  16. int main()
  17. {
  18.     recursive();
  19.     system("pause");
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement