【第三个更新版本】[windows系列]叙拉古猜想验证v1.2 SP2
程序 程序名称XULAGU__Win32平台Windows XP 或以上版本系统/软件要求安装Microsoft .NET Framework 3.5 或以上版本版本号1.2.1.0 (1.2 SP2)类型数学 作者991es82es大小(K)17.2更新日期2010-03-06描述这是一个windows验证叙拉古猜想的程序。成功了后输出提示。已知缺陷需要安装Microsoft .NET Framework 3.5 或以上版本
评分-源代码不包含
v1.2更新:
1、增加错误处理
2、美化输入体验
3、更正了版本信息错误的BUG
4、不再需要安装
===========================
v1.2 SP1更新:
增强了错误处理
进一步加强用户体验
===========================
v1.2 SP2更新:
美化界面,界面更加友善
增加提示框;增加验证次数显示框
进一步加大了验证数字的范围(64位整数) 附上源代码【VB.NET2008】Imports System.Math
Public Class Form1
Private Sub form1_closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
Timer2.Enabled = True
e.Cancel = True
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Opacity = 0
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Opacity += 1 / 50
If Me.Opacity = 1 Then Timer1.Enabled = False
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Me.Opacity -= 1 / 50
If Me.Opacity = 0 Then End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As Long, n As Integer = 0, send As Long
Dim 数字类型 As String
Try
result = Convert.ToInt32(TextBox1.Text)
Catch
End Try
If result <> 0 Then
TextBox2.Text = "开始验证" & vbCrLf & "初始数据 = " & result
If result <> 1 Then
Do While result <> 1
send = result
If result Mod 2 = 1 Then
result = result * 3 + 1
数字类型 = "奇数"
Else
result = result / 2
数字类型 = "偶数"
End If
n += 1
TextBox2.Text += vbCrLf & "进行第 " & Convert.ToString(n) & " 次运算" & vbCrLf & "数字" & Convert.ToString(send) & "为" & 数字类型 & vbCrLf & "进行运算:"
If 数字类型 = "奇数" Then
TextBox2.Text += Convert.ToString(send) & " * 3 + 1 = " & Convert.ToString(result)
Else
TextBox2.Text += Convert.ToString(send) & " / 2 = " & Convert.ToString(result)
End If
Loop
Else
TextBox2.Text += "result = 1"
End If
TextBox2.Text += vbCrLf + "验证完毕!"
Else
MsgBox("输入数据有误!", 128, "错误")
End If
End Sub
Private Sub TextBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Click
TextBox1.Text = ""
TextBox1.ForeColor = Color.Black
End Sub
End Class 嗯嗯,代码没有出现“不良信息”“违规词语”“**”的情况,不错 我看不懂VB.NET,只会用Visual Basic 6.0 输入-1,结果死机了 还是我这个好
【程序】叙拉古猜想验证(Visual Basic 6.0版本)] 已经修正几乎全部错误了 再次更新,近乎完美了,下周发布final版本 还是我的那个最好! ?->x
lbl 0
if x=1
then goto 1
ifend
if int x/2不等于x/2
then (x+1)/2 -> x
goto 0
ifend
if int x/2 =x/2
then x/2 -> x
goto 0
ifend
lbl 1
"x=1" △
大概就是这种代码,我用电脑打的,绝对是原创。 很好
页:
[1]