Thursday, 8 January 2015

C plus plus Pattern # 2

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

Output:




If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: