Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, x For i = 1 To x Line Input #1, a ans = 0 n = Len(a) For y = 1 To n b = LCase(Mid(a, y, 1)) If b >= "a" And b <= "z" Then ans = ans + 1 Next Print #2, ans Next Close Close End End Sub
Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, n For i = 1 To n Line Input #1, x a = Len(x) ans = 0 For j = 1 To a c = LCase(Mid(x, j, 1)) If c >= "a" And "z" >= c Then ans = ans + 1 Next j Print #2, ans Next i Close #2 Close #1 End End Sub
Private Sub Form_Load() Open App.Path & "\in.txt" For Input As 1 Open App.Path & "\out.txt" For Output As 2 Input #1, n For i = 1 To n Line Input #1, x ans = 0 a = Len(x) For j = 1 To a b = LCase(Mid(x, j, 1)) If b >= "a" And b <= "z" Then ans = ans + 1 Next j Print #2, ans Next i Close #2 Close #1 End End Sub
Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, n For i = 1 To n ans = 0 Line Input #1, r For j = 1 To Len(r) q = LCase(Mid(r, j, 1)) If q >= "a" And q <= "z" Then ans = ans + 1 Next j Print #2, ans Next i Close #1 Close #2 End End Sub
Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Input #1, n For i = 1 To n Line Input #1, x ans = 0 a = Len(x) For j = 1 To a y = LCase(Mid(x, j, 1)) If y <> "a" And y <> "b" And y <> "c" And y <> "d" And y <> "e" And y <> "f" And y <> "g" And y <> "h" And y <> "i" And y <> "j" And y <> "k" And y <> "l" And y <> "m" And y <> "n" And y <> "o" And y <> "p" And y <> "q" And y <> "r" And y <> "s" And y <> "t" And y <> "u" And y <> "v" And y <> "w" And y <> "x" And y <> "y" And y <> "z" Then ans = ans + 0 Else ans = ans + 1 End If Next j Print #2, ans Next i Close #2 Close #1 End End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, x
For i = 1 To x
Line Input #1, a
ans = 0
n = Len(a)
For y = 1 To n
b = LCase(Mid(a, y, 1))
If b >= "a" And b <= "z" Then ans = ans + 1
Next
Print #2, ans
Next
Close
Close
End
End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, n
For i = 1 To n
Line Input #1, x
a = Len(x)
ans = 0
For j = 1 To a
c = LCase(Mid(x, j, 1))
If c >= "a" And "z" >= c Then ans = ans + 1
Next j
Print #2, ans
Next i
Close #2
Close #1
End
End Sub
Private Sub Form_Load()
回覆刪除Open App.Path & "\in.txt" For Input As 1
Open App.Path & "\out.txt" For Output As 2
Input #1, n
For i = 1 To n
Line Input #1, x
ans = 0
a = Len(x)
For j = 1 To a
b = LCase(Mid(x, j, 1))
If b >= "a" And b <= "z" Then ans = ans + 1
Next j
Print #2, ans
Next i
Close #2
Close #1
End
End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, n
For i = 1 To n
ans = 0
Line Input #1, r
For j = 1 To Len(r)
q = LCase(Mid(r, j, 1))
If q >= "a" And q <= "z" Then ans = ans + 1
Next j
Print #2, ans
Next i
Close #1
Close #2
End
End Sub
Private Sub Form_Load()
回覆刪除Me.Hide
Open App.Path & "\in.txt" For Input As #1
Open App.Path & "\out.txt" For Output As #2
Input #1, n
For i = 1 To n
Line Input #1, x
ans = 0
a = Len(x)
For j = 1 To a
y = LCase(Mid(x, j, 1))
If y <> "a" And y <> "b" And y <> "c" And y <> "d" And y <> "e" And y <> "f" And y <> "g" And y <> "h" And y <> "i" And y <> "j" And y <> "k" And y <> "l" And y <> "m" And y <> "n" And y <> "o" And y <> "p" And y <> "q" And y <> "r" And y <> "s" And y <> "t" And y <> "u" And y <> "v" And y <> "w" And y <> "x" And y <> "y" And y <> "z" Then
ans = ans + 0
Else
ans = ans + 1
End If
Next j
Print #2, ans
Next i
Close #2
Close #1
End
End Sub