Thursday, 8 January 2015

C plus plus Pattern # 4

Leave a Comment
Code:

#include<iostream>
using namespace std;
void main()
{
int squre = 5;
for(int i = 0;i<squre;i++)
{
for(int j = 0;j<squre;j++)
{
cout<<char(i+65);  //type casting (int to char)
}
cout<<endl;
}

}


Output:


If You Enjoyed This, Take 5 Seconds To Share It