#include
using namespace std;
int main()
{
int n,a=0,b=1,sum;
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<" ";
}
while(sum<=n)
{
cout<<“a”;
sum=a+b;
a=b;
b=sum;
}
}
return 0;
}
#include
using namespace std;
int main()
{
int n,a=0,b=1,sum;
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<" ";
}
while(sum<=n)
{
cout<<“a”;
sum=a+b;
a=b;
b=sum;
}
}
return 0;
}
#include
using namespace std;
int main()
{
int n,a=0,b=1,sum;
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<" ";
}
while(sum<=n)
{
cout<<“a”;
sum=a+b;
a=b;
b=sum;
}
}
return 0;
}
@shdanish1508 Hey please save your code on ide.codingblocks.com and then share its link.I will check and correct your code there. It is easy for us to debug code there.