You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If statements evaluate an expression with a resulting type of bool and performs the actions inside the if block if the boolean evaluates true. Otherwise skips that block.
#>
Don't care about the functions if you don't understand them.
You can check out the functions section for further information
<#
import io
fn mod(int n, int x) -> int
if((n - x) < 0)
give n
;
give mod(n - x, x)
;
fn isEven(int n) -> bool
give mod(n, 2) == 0
;
int unknownNumber = 574
bool unknownIsEven = isEven(unknownNumber)
# If statement
if(unknownIsEven)
io.write("Unknown number is even")
;