How to picture “for” loop in block representation of algorithm

前端 未结 3 2047
既然无缘
既然无缘 2020-12-29 03:22

I have probem / strange question, i got algorithm with few \"for\" loops and now i need to do block scheme of this algorithm.

I know how to picture \"while\" loop,

3条回答
  •  感情败类
    2020-12-29 04:02

    Here's a flow chart that illustrates a for loop:

    Flow Chart For Loop

    The equivalent C code would be

    for(i = 2; i <= 6; i = i + 2) {
        printf("%d\t", i + 1);
    }
    

    I found this and several other examples on one of Tenouk's C Laboratory practice worksheets.

提交回复
热议问题