Monday, September 5, 2016

PROGRAM TO DISPLAY STAR TRIANGLE PATTERN:

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;
}