【正文】
b:12? a==b,Result:Enter integer a:12? Enter integer b:9? a!=b,Return,?,General form: expression1?expression2:expression3,Condition operator commands three operate objects,it is a operator alonely in C language.,ex: max=(ab) ? a : b。 scanf(“%f ,%f,%f”, },Return,?,include main() { int a,b。 Because in the brace({}) there is a full compound statement .,?,original program : main() { float a,b,t。,Form3:nested if statements,example,?,(1)The expression of three forms behind ifstatements always is logical or relation expression.,DCL of three if statements forms:,(2)In form2 and forme3,there is a semicolon in front of else, also in the end of all statements.,(3)Behind if or else,it may include only one operate statements,also include many statements ,but should be drawed together with brace.({ }),?,Ex: include main() { int x,y。 else if (number50) cost=0.05。 else if (number300) cost=0.10。 else printf(“%d”,y)。Ch5