Write a program to print the star pattern in pyramid form

//this is a pattern to print the star patter in pyramid form
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int i,j;

cout<<"\n\nDisplaying the Piramide Pattern: \n";

for(i=1;i<=4;i++)
{
cout<<"\n";

for(j=4;j>=1;j--)
{
if(j>i)
cout<<"\t";
else
cout<<"\t * \t";


}
}

return 0;
}

Previous
Next Post »