Friday, 7 August 2015

Right Triangle pattern using capital alphabets E D C B A

Leave a Comment
Questions:

Right Triangle pattern using capital alphabets E D C B A

Code:

#include<iostream>
using namespace std;
void main()
{
//Right Triangle pattern using capital alphabets E D C B A
int square;
cout<<"Enter The Size of Square = "; // size
cin>>square;
for(int i = 1;i<=square;i++) // outer loop
{
for(int j=square;j>=i;j--) //inner loop
{
cout<<char(j+64)<<" "; // value that is output
}
cout<<endl;//new line for next line output
}

}


Output

If You Enjoyed This, Take 5 Seconds To Share It