#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int arr[n];
arr[0]=1;
arr[1]=1;
if(1<=n&&n<=1000)
{
return 0;
}
for(int i=2;i<n;i++)
{
arr[i]=arr[i-1]+arr[i-2];
}
for(int i=0;i<n;i++)
{
cout<<arr[i];
}
cout<<arr[n-1];
return 0;
}
The program asks user to enter 'n' and then the program ends without any output.
Output:
6
...Program finished with exit code 0 Press ENTER to exit console.