《计算机算法设计与分析》算法概述.ppt

* * (1.3) switch语句 switch (expression) { case 1: statement sequence; break; case 2: statement sequence; break; ? default: statement sequence; } * * (2)迭代语句 (2.1) for 循环: for (init;condition;inc) statement; (2.2) while 循环: while (condition) statement; (2.3) do-while 循环: do{ statement; } while (condition); * * (3)跳转语句 (3.1) return语句: return expression; (3.2) goto语句: goto label; ? label: * * (4)函数 例: return-type function name(para-list) { body of the function } int max(int x,int y) { return xy?x:

文档评论(0)

1亿VIP精品文档

相关文档