Friday, 7 August 2015

Left Triangle pattern using Numerical digits

Leave a Comment
Questions:

Left Triangle pattern using Numerical digits

Code:

#include<iostream>
using namespace std;
void main()
{

//Left Triangle pattern using Numerical digits
int square,space=0;
cout<<"Enter The Size of Square = "; // size
cin>>square;
space=square;
for(int i=1;i<=square;i++)
{
for(int j=1;j<=space;j++)
{
cout<<" ";
}
for(int l=1;l<=i;l++)
{
cout<<i;
}
cout<<endl;
space--;
}

}


Output


If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: