Code:
#include<iostream>
using namespace std;
void main()
{
int squre;
cout<<"Enter The Size of Squre = "; // size
cin>>squre;
for(int i = 1;i<=squre;i++) // outer loop
{
for(int i = 1;i<=squre;i++) //inner loop
{
cout<<"*"; // value that is output
}
cout<<endl;//new line for next line output
}
}
Output:
#include<iostream>
using namespace std;
void main()
{
int squre;
cout<<"Enter The Size of Squre = "; // size
cin>>squre;
for(int i = 1;i<=squre;i++) // outer loop
{
for(int i = 1;i<=squre;i++) //inner loop
{
cout<<"*"; // value that is output
}
cout<<endl;//new line for next line output
}
}
Output:
0 Questions:
Post a Comment