Tuesday, 10 March 2015

Pattern 9

Leave a Comment
Code:
#include<iostream>
using namespace std;
void main()
{
int size=0;
cout<<"Enter size = ";
cin>>size;
//outer loop for handling columns
for(int i=size;i>0;i--)
{
//inner loop is for handling rows
for(int j=size;j>0;j--)
{
cout<<char(i+64)<<"  ";
}
cout<<endl;
}
}

Output:

If You Enjoyed This, Take 5 Seconds To Share It