iOS training------My C language notes, look forward to communicating with you!
/*the 1th structure of the 1.if if (condition) {statement 1; Statement 2; ...... } The 2nd structure of the 2.if if (condition 1) {statement 1; Statement 2; ...... } The 3rd structure of the else {} 3.if if (condition 1) {statement 1; Statement 2; ...... } else if (condition 2) {} else if (condition 3) {} else if (condition 4) {} else {} 4.if 4th struct if (conditional) statement 1;*/#include<stdio.h>intMain () {/*int count = 60; if (count >=60) {printf ("Pass!!! \ n "); } else {printf ("Less!!! \ n "); }*/ /*int a = 6; if (a++ >)//A = = 7 {printf ("a\n"); } else if (a++ > 5)//A = = 8 {printf ("b\n"); } else if (a++ > 3) {printf ("c\n"); } else {printf ("d\n"); } printf ("A's value is%d\n", a); Output display: The value of C//A is 8*/ intA =-Ten; if(a>1)//conditions are not tenableprintf"a\n");//Skip overprintf ("b\n");//jump straight to this .//output display: B return 0;}
"Good Programmer's note sharing" C language if statement