can we put the restriction on some function of the loop variable in the loop conditions like the for loop in the following program
#include<iostream>
using namespace std;
int main()
{
int a,size=2,b[size],i;
cin>>a;
b[0]=1;
b[1]=1;
cout<<"The fabbonacci sequence is:"<<b[0]<<" "<<b[1]<<" ";
for(i=2;b[i]<=a;i++)
{
b[i]=b[i-1]+b[i-2];
size++;
cout<<b[i]<<" ";
}
system("pause");
return 0;
}
this program is expected to give fabonacci sequence till the integer a.Pls help me with this program