Searching...

What is Nested For Loop? Describe Flow Diagram

15:30

Nested Loop:

           The loop within a loop is called Nested loop. In nested loops the inner loop is executed completely with each change in the value of counter variable of outer loop. The nesting can be done upto any level. The increase in level of nesting increases the complexity of nested loop.

Flow Diagram:

Example:

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
for (int i=1;i<=3;i++)
{
for(int j=1;j<=3;j++)
cout << i <<"\t"<<j<<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.