Sub if1() Dim age As Integer age = Val(InputBox("何歳です")) If age = 20 Then MsgBox "20です" End If End Sub Sub if2() Dim work As Integer work = Val(InputBox("アルバイトのじかんは?")) If work <= 28 Then MsgBox "OK" End If End Sub Sub if3() Dim Score As Integer Dim result As Boolean Score = Val(InputBox("点数は?")) result = (Score > 80) If result = True Then MsgBox "PASS" End If End Sub Sub if4() Dim JPyear As Integer JPyear = Val(InputBox("今年は令和で何年ですか?")) If JPyear = 1 Then MsgBox "今年は令和元年です" Else MsgBox "今年は令和" & JPyear & "年です" End If End Sub Sub if5() Dim age As Integer Dim price As Integer price = 1000 age = Val(InputBox("何歳ですか?")) If age < 13 Then price = price \ 4 Else If age <= 18 Then price = price \ 2 End If End If MsgBox "入場料" & price & " 円です" End Sub Sub if6() Dim age As Integer Dim price As Integer price = 1000 age = Val(InputBox("何歳ですか?")) If (age >= 10) And (age < 20) Then price = price \ 2 End If MsgBox "入場料" & price & " 円です" End Sub Sub if7() Dim age As Integer Dim price As Integer price = 1000 age = Val(InputBox("何歳ですか?")) If (age >= 60) Or ((age >= 10) And (age < 20)) Then price = price \ 2 End If MsgBox "入場料" & price & " 円です" End Sub Sub seiseki() Dim Score As Integer Score = Val(InputBox("点数を入力してください")) If Score > 100 Then MsgBox "範囲外です" ElseIf Score = 100 Then MsgBox "あなたの成績はSです" ElseIf Score >= 80 Then MsgBox "あなたの成績はAです" ElseIf Score >= 70 Then MsgBox " あなたの成績はBです" ElseIf Score >= 60 Then MsgBox "あなたの成績はCす" ElseIf Score >= 0 Then MsgBox "あなたの成績はDです" Else MsgBox "範囲外です" End If End Sub