Need a help, how can i print arr pointer with value of arrfibo[] on fibo function ?
#include <iostream>
using namespace std;
int fibo(int input){
for(int i=0;i<input;i++){
if(i<2){
arrfibo[i] = i;
}else{
arrfibo[i] = arrfibo[i-2] + arrfibo[i-1];
}
}
}
main(){
int inp;
cout << "Enter number of fibonancci = ";
cin >> inp;
int *arr;
// how can i print arr pointer with value of arrfibo[] on fibo function ?
}
thanks for any answer,
main()is a syntax error.