vb2010写的程序运行两百次速度还可以,如果要运行再多的次数可以开个多线程去运算就不会卡了
运行前
运行后
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim 计数器 = 0
TextBox4.Text = "0."
Do While 计数器 < TextBox3.Text
TextBox1.Text = TextBox1.Text * 10
TextBox4.Text = TextBox4.Text & TextBox1.Text \ TextBox2.Text
TextBox1.Text = TextBox1.Text Mod TextBox2.Text
If (计数器 + 3) Mod 20 = 0 Then TextBox4.Text &= vbCrLf
计数器 += 1
If TextBox1.Text = 0 Then Exit Do
Loop
Label1.Text = "运算结束,共运算了" & 计数器 & "次"
End Sub
细节自己补充,
Private Sub Command1_Click()
Dim a As Integer, b As Integer
Dim c As Integer
a = 16
b = 19
Dim i As Integer
Print "0.";
For i = 1 To 200
a = a * 10
c = a \ b
a = a Mod b
Print CStr(c);
If i Mod 20 = 0 Then Print: Print " ";
If a = 0 Then Exit For
Next
Print
End Sub
题目内容: 由于计算机内部表达方式的限制,