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(j+65); //type casting (int to char)
}
cout<<endl;
}
}
Output:
#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(j+65); //type casting (int to char)
}
cout<<endl;
}
}
0 Questions:
Post a Comment