To verify Goldbach's conjecture with VB programming, that is, an even number greater than or equal to 6 can be expressed as the sum of two prime numbers Try not to use too complicated and high-end sentences. We haven't learned many of them Private Sub Form_ Click() Dim a As Long,b As Long,c As Long,i As Long,t As Long c = a - b Do A = Val (InputBox ("input not less than 6 even")) Loop Until a >= 6 And a Mod 2 = 0 If (b = 2 Or b = 3) And (c = 2 Or c = 3) Then Print a + "=" + b + "+" + c Else For i = 2 To Sqr(b) If b Mod i = 0 Then For t = 2 To Sqr(c) If c Mod t = 0 Then Print a + "=" + b + "+" + c Next t Next i If i > Sqr(b) Then If t > Sqr(c) Then Print a + "=" + b + "+" + c End If End If End Sub Seek correction

To verify Goldbach's conjecture with VB programming, that is, an even number greater than or equal to 6 can be expressed as the sum of two prime numbers Try not to use too complicated and high-end sentences. We haven't learned many of them Private Sub Form_ Click() Dim a As Long,b As Long,c As Long,i As Long,t As Long c = a - b Do A = Val (InputBox ("input not less than 6 even")) Loop Until a >= 6 And a Mod 2 = 0 If (b = 2 Or b = 3) And (c = 2 Or c = 3) Then Print a + "=" + b + "+" + c Else For i = 2 To Sqr(b) If b Mod i = 0 Then For t = 2 To Sqr(c) If c Mod t = 0 Then Print a + "=" + b + "+" + c Next t Next i If i > Sqr(b) Then If t > Sqr(c) Then Print a + "=" + b + "+" + c End If End If End Sub Seek correction

Ideas and methods:
1, enter an even number n greater than or equal to 6
2
For i = 2 to n-2
If I is a prime and n-i is a prime then
Output: I, n-i
Exit For
End If
Next i