1、測試1
num = 8
if (num %% 2 == 0) { print("even!") }
2、測試2
num = 7
if (num %% 2 == 0) { print("even!") }
3、測試3
num = 7
if (num %% 2 == 0) { print("even!") } else { print("odd!") }
4、測試4
for (i in 1:10) { if (i %% 2 == 0) { print(i) } }
5、測試5
score <- 88
if (score >= 0 & score < 60) { print("failed") } else
if (score >= 60 & score < 70) { print("pass") } else
if (score >= 70 & score < 90) { print("brilliant") } else
if (score >= 90 & score <= 100) { print("excellant!") } else { print("input error") }