Code:
#include<iostream>
using namespace std;
void main()
{
int squre = 5;
for(int i = 1;i<=squre;i++) // outer loop
{
for(int j = 1;j<=squre;j++) //inner loop
{
cout<<i; // value that is output
}
cout<<endl;//new line for next line output
}
}
Output:
#include<iostream>
using namespace std;
void main()
{
int squre = 5;
for(int i = 1;i<=squre;i++) // outer loop
{
for(int j = 1;j<=squre;j++) //inner loop
{
cout<<i; // value that is output
}
cout<<endl;//new line for next line output
}
}
Output:
0 Questions:
Post a Comment