Searching...

Pattern with Nested For Loop

15:22

Write a program that will display the following patter using nested for loop....
1
22
333
4444
55555
  
#include <iostream>
using namespace std;
int main()
{
for (int i=1;i<=5;i++)
{ for (int j=1;j<=i;j++)
cout << i;
cout <<endl;
}
return 0;
}

0 comments:

Post a Comment

Thanks For Your FeedBack....

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.