if语句后面可以跟一个可选的else语句,该语句在表达式为false时执行。
if (expression) {
Block of statements;
}
else {
Block of statements;
}
/* Global variable definition */
int A = 5 ;
int B = 9 ;
Void setup () {
}
Void loop () {
/* check the boolean condition */
if (A > B) /* if condition is true then execute the following statement*/ {
A++;
}else {
B -= A;
}
}