flow chart for nested loop

how to draw a flow chart for following nested loop?


1
2
3
4
5
6
7
for(int r=1;r<=5;r++){ 
		for(int c=1;c<=r;++c){ 

			cout<<c;
			
		}
		cout<<endl;
What -exactly- are you
trying to do?

actually your program -code-
output this


1
12
123
1234
12345


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Output.cpp
//##

#include <iostream>
using std::cout;
using std::endl;


int main(){


for(int r=1;r<=5;r++){
        for(int c=1;c<=r;++c){
                cout<<c;
        }//end inner for loop
cout<<endl;
}//end outer for loop


return 0; //indicates success
}//end main 
Topic archived. No new replies allowed.