Tuesday, 10 March 2015

Pattern 5

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=0;i<5;i++)
{
//inner loop is for handling rows
for(int j=0;j<size;j++)
{
cout<<char(i+65)<<"  ";
}
cout<<endl;
}
}

Output

If You Enjoyed This, Take 5 Seconds To Share It