User Input

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

userInput = Inputbox ("Enter any number")

for i = 2 to userInput/2
If userInput Mod i = 0 Then
flag = 1
Exit for
End If
i=i+1
Next
If flag = 1 Then
Msgbox userInput & " is not a Prime number"
Else
Msgbox userInput & " is a Prime number"
End If

You might also like