This is what i have. It generates prime numbers but i need it to be palindromic.

Public Class Form1
Private Sub btnPrime_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrime.Click
        Dim n As Integer
        Dim min As Integer
        Dim max As Integer
        min = txtbox1.Text
        max = txtbox2.Text
        For i = min To max
            If IsPrime(i) = True Then
            End If
    End Sub
    Private Function IsPrime(ByVal number As Long) As Boolean
        Dim i As Integer
        If number = 2 Then
            Return True
            If number = 1 Then
                Return False
            ElseIf number > 2 Then
                For i = 2 To number - 2
                    If number Mod i = 0 Then
                        Return False
                    End If
            End If
        End If
        Return True
    End Function
End Class

Edited 5 Years Ago by WaltP: Added CODE Tags -- please use them

You obviously ignored every reference to CODE tags all over the place. Even the one that smacks you in the face when you type in your messages!

I also see no attempt at all to test if a number is palindromic. Since prime and palindrome have nothing to do with each other, you have not even made an attempt. Please reread the Member Rules.

Edited 5 Years Ago by WaltP: n/a

Well i added

If i = StrReverse(i) Then

and it worked.
Thanks anyway, i suppose...

This question has already been answered. Start a new discussion instead.