#include<iostream>
using namespace std;
void main()
{
//Square pattern using Numeric digit single inline in reverse order
int square;
cout<<"Enter The Size of Square = "; // size
cin>>square;
for(int i = square;i>=1;i--) // outer loop
{
for(int j = square;j>=1;j--) //inner loop
{
cout<<i<<" "; // value that is output
}
cout<<endl;//new line for next line output
}
}
Output
No comments:
Post a Comment