#include<iostream.h>
#include<conio.h>
void main()
{
int n;
cout<<"enter the number of lines :";
cin>>n;
for(int i=1 ; i<=n ; i++)
{
for(int j=1 ; j<=n-i ; j++)
cout<<" ";
for(int k=1 ; k<=i ; k++)
cout<<char(64+k);
cout<<"\n";
}
getch();
}
.................................................................
OUTPUT :(click to enlarge the image)
No comments:
Post a Comment