#include<iostream>
using namespace std;
int main()
{
int i, j, incr=1, cnt;
cout<<"\n Enter Number of Rows : ";
cin>>cnt;
cout<<"\n";
char ch = 'A';
for(i=0; i<cnt; i++)
{
for(j=0; j<incr; j++)
{
cout<<ch<<" ";
ch++;
}
cout<<"\n";
incr = incr + 1;
}
return 0;
}
#include<iostream>
using namespace std;
int main()
{
int i, j, cnt;
cout<<"\n Enter Number of Rows : ";
cin>>cnt;
cout<<"\n";
char ch='A';
for(i=0; i<cnt; i++)
{
for(j=0; j<=i; j++)
{
cout<<ch<<" ";
}
cout<<"\n";
ch++;
}
return 0;
}
#include<iostream>
using namespace std;
int main()
{
int i, j, k, decr=8, count=64, temp, rows;
char ch='A';
cout<<"\n Enter Number of Rows : ";
cin>>rows;
for(i=0; i<rows; i++)
{
for(k=0; k<decr; k++)
{
cout<<" ";
}
for(j=0; j<i+1; j++)
{
count++;
}
ch = count;
temp = ch;
for(j=0; j<i+1; j++)
{
cout<<ch--<<" ";
}
cout<<"\n";
ch = temp;
decr=decr-2;
}
return 0;
}