### If-Then-Elif-Else

 If Then (s) [Else statement(s)]If Then   [statement(s)] [Elif Then]   [statement(s)]...[Else]   [statement(s)]End IfMakes a decision regarding program flow based on the result returned by an expression.If the result of is nonzero (logical true), the Then statement(s) is executed.If the result of expression is zero (false), the Then statement(s) is ignored and the Else statement(s), if present, is executed.Elif statement, as its name suggests, is a combination of If and Else. Like Else, it extends an If statement to execute a different statement in case the original If expression evaluates to False. However, unlike Else, it will execute that alternative expression only if the Elif conditional expression evaluates to True.Otherwise, execution continues with the next executable statement.Example 1:If N%<20 And N%>10 Then Print "OK": GoTo skip_error    Print "N% IS OUT OF RANGE"skip_error:    Rem --- N% is in the range (10..20)Example 2:If x>0 Then Print "Positive" Else Print "Negative"Example 3:If x>0 Then    Print "Positive"ElIf x<0 Then     Print "Negative"Else    Print "Zero"End IfExample 4:' If A > 10, execute the three colon-separated statements in the order' that they appearIf A > 10 Then A = A + 1 : B = B + A : C = C + BExample 5:' If A > 10, execute the three statements in the order' that they appearIf A > 10 Then     A = A + 1     B = B + A     C = C + BEnd IfExample 6:Input n%If n% mod 2 = 0 Then     Print n%; " is even"Else    Print n%; " is odd"End IfExample 7:' graph2.bas - This file is part of nuBASIC dx%=GetSWidth() dy%=GetSHeight() Randomize While 1 x1%=Rnd(1)*dx% x2%=Rnd(1)*dx% y1%=Rnd(1)*dy% y2%=Rnd(1)*dy% t%=Int(Rnd(1)*6) c%=Int(Rnd(1)*&hffffff) If t%=1 Then Line x1%,y1%,x2%,y2%,c% Elif t%=2 Then Rect x1%,y1%,x2%,y2%,c% Elif t%=3 Then FillRect x1%,y1%,x2%,y2%,c% Elif t%=4 Then Ellipse x1%,y1%,x2%,y2%,c% Else TextOut x1%,y1%, "nuBASIC",c% End if k\$=InKey\$() If k\$="q" Then End End While