Web Site Devloped By Abhishek Mishra
Tech. Help By Anand Mishra
Contact no. 9425355631

Powerd by Shree Guru Kripa Computer


vb.net_PRIME_NUMBER_BY_VARIABLE


This is vb.net_PRIME_NUMBER_BY_VARIABLE Program.This is contain a button, input box. Ans show in message box.

Public Class Form1
Dim P, N As Byte
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
P = InputBox("ENTER NUMBER:")
For N = 2 To (P - 1)
If P Mod N = 0 Then
Exit For
End If
Next
If N = P Then
MsgBox("PRIME NUMBER.")
Else
MsgBox("NOT A PRIME NUMBER.")
End If
End Sub
End Class