48-2

#include
#include
void main()
{
                int i,j,k,n;
                clrscr();
                cout<<"Enter The Length of pattern :- ";                 cin>>n;
                for(i=1;i<=n;i++)
                                {
                                cout<<"\n";
                                for(k=i;k<=n-1;k++)
                                                {
                                                cout<<"\t";
                                                }
                                for(j=1;j<=i;j++)
                                                {
                                                cout<<"*\t";
                                                }
                                }
                getch();
}

48

Advertisements