Thursday, 8 January 2015

C plus plus Pattern # 1

Leave a Comment
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:





If You Enjoyed This, Take 5 Seconds To Share It