官术网_书友最值得收藏!

Basic flow statements

What are basic flow statements? These are several statements which help you to structure the program code in a way that allows you to do different action(s) based on the data stored in particular variables. We will learn how to execute just part of the code if a certain condition is met (the condition could be a pretty complex Boolean expression). Then, we will find a way to execute different actions several times in a loop. The next thing will be to learn how to repeat things until a condition is met and to stop executing statements once the condition is not satisfied. Using flow-control statements, we can construct pretty complex code chunks, similar to what we can express with regular text writing. To develop a program, we should first create an algorithm (a sequence of steps) which leads to the desired result, taking into account all external and internal conditions. Based on this sequence, we can then develop a program, using all flow operators. But let's get familiar with some forms of them.

主站蜘蛛池模板: 隆昌县| 内丘县| 深水埗区| 新竹市| 土默特右旗| 水富县| 阳泉市| 梅河口市| 湘潭市| 常山县| 始兴县| 神农架林区| 墨脱县| 比如县| 喀喇| 朔州市| 平潭县| 大足县| 宣恩县| 湟源县| 宁陕县| 湘潭市| 井冈山市| 龙泉市| 曲周县| 乌鲁木齐市| 盐津县| 菏泽市| 兰西县| 昌黎县| 安吉县| 西青区| 阿克苏市| 阿图什市| 汉源县| 郓城县| 龙胜| 宁远县| 寿阳县| 罗田县| 澎湖县|