ANSWERS: 1
  • Here it is private sub command_click() x = InputBox("Enter the number") j = 0 If x = 1 Then Print "Neither Prime nor composite" End If For i = 1 To x If x Mod i = 0 Then j = j + 1 End If Next i If j = 2 Then Print "Prime" ElseIf j <> 2 And x <> 1 Then Print "Composite" End If end sub

Copyright 2016, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy