Private Sub Form_Load() Me.Hide Open App.Path & "\in.txt" For Input As #1 Open App.Path & "\out.txt" For Output As #2 Do Line Input #1, temp strr = Split(temp, ":") If Val(strr(0)) = 0 And Val(strr(1)) = 0 Then Exit Do If Val(strr(0)) > 6 Then strr(0) = Abs(12 - Val(strr(0))) If Val(strr(1)) > 30 Then strr(1) = Abs(60 - Val(strr(1))) If Val(strr(0)) > 0 Then degree = (Int(Abs(Val(strr(0)) - Val(strr(1))) * 60 * 60 * 0.0083) + 1) If Val(strr(1)) > 0 Then subsub = (Int(Val(strr(1)) * 60 * 0.0083) + 1) tempp = degree - subsub Print #2, Format(tempp, "0.000") minutee = 0: hourr = 0 Loop 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 Do Until EOF(1) Line Input #1, x If x = "0:00" Then Exit Do a = Val(Left(x, 2)) b = Val(Right(x, 2)) t = (a * 30 + 6 * b / 12) - 6 * b z = 360 - t If t > z Then Print #2, Format(z, "0.000") Else Print #2, Format(t, "0.000") Loop 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 Do While Not EOF(1) Line Input #1, a b = Split(a, ":") If b(0) = "0" And b(1) = "00" Then End c = Val(b(1)) * 6 / 12 t = ((Val(b(0)) * 30 + c) - Val(b(1)) * 6) g = 360 - t If t <= g Then Print #2, Format(t, "0.000") If t > g Then Print #2, Format(g, "0.000") Loop 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
Do
Line Input #1, temp
strr = Split(temp, ":")
If Val(strr(0)) = 0 And Val(strr(1)) = 0 Then Exit Do
If Val(strr(0)) > 6 Then strr(0) = Abs(12 - Val(strr(0)))
If Val(strr(1)) > 30 Then strr(1) = Abs(60 - Val(strr(1)))
If Val(strr(0)) > 0 Then degree = (Int(Abs(Val(strr(0)) - Val(strr(1))) * 60 * 60 * 0.0083) + 1)
If Val(strr(1)) > 0 Then subsub = (Int(Val(strr(1)) * 60 * 0.0083) + 1)
tempp = degree - subsub
Print #2, Format(tempp, "0.000")
minutee = 0: hourr = 0
Loop
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
Do Until EOF(1)
Line Input #1, x
If x = "0:00" Then Exit Do
a = Val(Left(x, 2))
b = Val(Right(x, 2))
t = (a * 30 + 6 * b / 12) - 6 * b
z = 360 - t
If t > z Then Print #2, Format(z, "0.000") Else Print #2, Format(t, "0.000")
Loop
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
Do While Not EOF(1)
Line Input #1, a
b = Split(a, ":")
If b(0) = "0" And b(1) = "00" Then End
c = Val(b(1)) * 6 / 12
t = ((Val(b(0)) * 30 + c) - Val(b(1)) * 6)
g = 360 - t
If t <= g Then Print #2, Format(t, "0.000")
If t > g Then Print #2, Format(g, "0.000")
Loop
Close #2
Close #1
End
End Sub