PROGRAM TO DISPLAY STAR TRIANGLE PATTERN IN AN ARRAY
#include <iostream>
using namespace std;
int main()
{
int i,j,n;
cout<<"Enter Length of Pattern: ";
cin>>n;
cout<<"\nPattern is:\n";
for(i=n; i>=1; i--)
{
for(j=n; j>=i; j--)
cout<<"*";
cout<<endl;
}
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int i,j,n;
cout<<"Enter Length of Pattern: ";
cin>>n;
cout<<"\nPattern is:\n";
for(i=n; i>=1; i--)
{
for(j=n; j>=i; j--)
cout<<"*";
cout<<endl;
}
return 0;
}