哈工大c语言教学 循环控制结构.ppt

第6章 循环控制结构;本章学习内容;Example:;;6.1循环控制结构与循环语句;counter ← 1, sum ← 0;6.2计数控制的循环;当型循环——Condition is tested first 计数控制——Loop is controlled by a counter Syntax for (initial value ; condition; update counter) statement; Or for (initial value ; condition; update counter) { statement; statement; };i ← 0, sum ← 0;A; 当型循环——Condition is tested first 条件或计数控制 ——Loop is controlled by condition or a counter 语法 while (condition) statement; Or while (condition) { statement; statement; };直到型循环——Statements in the loop are executed first (at lea

文档评论(0)

1亿VIP精品文档

相关文档