Monday, September 5, 2016

PROGRAM TO PRINT THE FOLLOWING PATTERN:

PROGRAM TO PRINT THE FOLLOWING PATTERN:
6
65
654
6543
65432
654321

#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<<j;
cout<<endl;
}
return 0;
}