[荒井]情報処理演習
[TOPに戻る]
n = InputBox("please input your bone year")
t = 2002 - n
text1.Text = t
n = Val( InputBox("please input your bone year") )
t = 2002 - n
text1.Text = t
If t < 20 Then
text2.Text = "tabaco NG"
Else
text2.Text = "tabaco OK"
End If
>=, >, =, <, <= [両端二つに値/変数を書いて比べる]
and, or [両端に論理式を書いてつなげて比べる]
not [右に論理式を書いて否定する]
a < b
a > 0 and a < 10
a < 0 or a > 10
c = a Mod b
とした場合、a÷bの余りがcに代入される。
Randomize
x = Int( Rnd * 6 ) + 1
Randomize
n = Val( InputBox("please input your bone year") )
t = 2002 - n
x = Int( Rnd * 6 ) + 1
text1.Text = t
If t < 20 Then
if x <= 3 Then
text2.Text = "tabaco NG"
Else
text2.Text = "sake NG"
End If
Else
if x <= 3 Then
text2.Text = "tabaco OK"
Else
text2.Text = "sake OK"
End If
End If