Tuesday, 10 March 2015

Pattern 6

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 i=0;i<size;i++)
{
cout<<char(i+65)<<"  ";
}
cout<<endl;
}
}

Output:


If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: