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