人民邮电出版3 322 if else语句 第二种i语句是 if else语句。它的格式是 if(condition)statement; else statement: 其中 condition和 Istatement的含义与第一种语 冷Y句格式是一样语句中和是语句的关键字 语句的执行过程是,当条件表达式的值为真 时,执行它后面的语句或语句块;否则执行ele后 面的语句或语句块
人民邮电出版社 3.2.2 if_else语句 第二种if语句是if_else语句。它的格式是 if(condition)statement; else statement; 其中condition和statement的含义与第一种if语 句格式是一样。语句中if和else是语句的关键字。 语句的执行过程是,当条件表达式的值为真 时,执行它后面的语句或语句块;否则执行else后 面的语句或语句块
人民邮电出版3 323 if else if语句 第三种语句是 if else if形式的语句。这种i语 句的一般格式是 if(conditionl) statement 1 else if(condition2) statement 2 else if(condition statemen 5; else statement n;
人民邮电出版社 3.2.3 if_else_if语句 第三种if语句是if_else_if形式的if语句。这种if语 句的一般格式是 if(condition1) statement_1; else if(condition2) statement_2; else if(condition3) statemen_3; ………… ………… ………… else statement_n;