Module Module1
Sub Main()
Dim a As Date
Dim h, m, s As Integer
Dim n, i As Long
Dim x, z As Long
Dim y As Long
Console.WriteLine("本程序为倒计时程序,请分部输入需要倒数的小时数、分钟数、秒数")
Console.WriteLine("请输入计时的小时数(大于等于0的整数):")
h = Console.ReadLine()
Console.WriteLine("请输入计时的总分钟数(大于等于0并且小于60的整数):")
m = Console.ReadLine()
Console.WriteLine("请输入计时的秒数(大于等于0的并且小于60的整数):")
s = Console.ReadLine()
Console.WriteLine("当前系统时间为:{0}", h)
a = Now()
Console.WriteLine("当前系统时间为:{0}", a)
Console.WriteLine(" ")
Console.WriteLine(" **************倒计时开始***************** ")
Console.WriteLine(" **************倒计时开始***************** ")
Console.WriteLine(" **************倒计时开始***************** ")
Console.WriteLine(" **************倒计时开始***************** ")
z = 0
x = 60
For i = 0 To h * 3600 + m * 60 + s
For n = 0 To 6000000
For y = 0 To 25
z = z + 1
Next
Next
If (h <= 0) And (m <= 0) And (s <= 0) Then Exit For
If s > 0 Then
s = s - 1
Console.WriteLine(" 剩余:{0}小时{1}分{2}秒", h, m, s)
If (h <= 0) And (m <= 0) And (s <= 0) Then
Console.WriteLine("倒计时完毕,随意输入字符将退出程序:")
Exit For
End If
End If
If s = 0 Then
If m > 0 Then
m = m - 1
s = 59
Console.WriteLine(" 剩余:{0}小时{1}分{2}秒 ", h, m, s)
End If
If m = 0 And h > 0 And s = 0 Then
h = h - 1
m = 59
s = 59
Console.WriteLine(" 剩余:{0}小时{1}分{2}秒 ", h, m, s)
If (h <= 0) And (m <= 0) And (s <= 0) Then
Console.WriteLine("倒计时完毕,随意输入字符将退出程序:")
Exit For
End If
End If
End If
Next
Console.Read()
End Sub
End Module
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有