/*
To Print Patterns (Pyramid)
*
**
***
****
......
n......n
*/
#include<iostream.h>
#include<conio.h>
Void main()
{
clrscr();
cout<<"Enter the no of rows for which pattern required";
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<"*";
}
}
getch();
}
To Print Patterns (Pyramid)
*
**
***
****
......
n......n
*/
#include<iostream.h>
#include<conio.h>
Void main()
{
clrscr();
cout<<"Enter the no of rows for which pattern required";
cin>>n;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
cout<<"*";
}
}
getch();
}
helpful
ReplyDelete