Private Sub Form_Load() ii = FreeFile Open "D:\contoh.txt" For Output As #ii mn = 199999992 nm = 300000000 For n = mn To nm srn = Sqr(n) isrn = Int(srn) For i = 2 To isrn If n Mod i = 0 Or srn = isrn Then GoTo 1 Next i Print #ii, n 1 Next n End Sub