Write a program to display star pattern 1

//this is a program to display star pattern 1
#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=1;j<=i;j++)
cout<<" * ";
}

   
return 0;
}

Previous
Next Post »