Write a program to display star pattern 2

//this is a program to display star pattern 2
#include<iostream>
#include<conio.h>

using namespace std;

int main()
{
int rows,i,j;

cout<<"\n\nEnter the numbers orf rows: ";
cin>>rows;

cout<<"\n\nDisplaying the star pattern: \n\n";

for(i=1;i<=rows;i++)
{
cout<<"\n";
for(j=rows;j>=i;j--)
cout<<" * ";
}

return 0;

}

Previous
Next Post »