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")
}