C++ Program to print a pattern of right angled triangle [DEVCPP/GCC]

PROGRAM

//Program to print a pattern of left right angled triangle

# include<iostream>

using namespace std;

int main()
{
int i,j,n;

cout<<"ENTER THE NUMBER OF ROWS: \n";
cin>>n;

for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
if(j<=i)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}

         return 0;
}

OUTPUT

C++ Program to print a pattern of right angled triangle with output

Share this

Related Posts

:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
:-?
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
$-)
(y)
(f)
x-)
(k)
(h)
cheer

FIND US ON FACEBOOK!