Advertisement
Wolfinstein

Prime

Apr 2nd, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. temp = 101
  3.  
  4.  
  5. bFlag = True
  6.  
  7. For temp =2 to temp-1
  8.  
  9. For i=2 to temp-1
  10.  
  11.     temp1 = temp Mod i
  12.     If temp1 =0 Then
  13.         bFlag = False
  14.         Exit for
  15.     End If
  16.  
  17. Next
  18.  
  19. If bFlag Then
  20.     Wscript.Echo temp & " Prime"
  21. Else
  22.     Wscript.Echo temp & " Not Prime"
  23. End If
  24.  
  25. bFlag = True
  26.  
  27. Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement