Thursday, 8 January 2015

C plus plus Pattern # 3

Leave a Comment
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<<j; // value that is output
}
cout<<endl;//new line for next line output
}

}

Output:


If You Enjoyed This, Take 5 Seconds To Share It