Guest User

Untitled

a guest
May 22nd, 2019
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub six()
  2. Dim n As Integer, s As String, f As String, Table(15) As Integer, Z As Integer, k As String, h As Integer
  3.  
  4. Z = 0
  5. h = 0
  6.  
  7. For n = 1 To 15
  8. Table(n) = Rnd * 15
  9. Next n
  10.  
  11. For n = 1 To 15
  12. s = s & Table(n) & " "
  13. Next n
  14. MsgBox s
  15.  
  16. For n = 1 To 15
  17. If 3 <= Table(n) <= 11 Then
  18. Z = 1 + Z
  19. End If
  20. f = f & Table(n) & " "
  21. Next n
  22.  
  23. If Z < 4 Then
  24. For n = 1 To 15
  25. If Table(n) Mod Z = 0 Then
  26. h = h + Table(n)
  27. End If
  28. Next n
  29. Else
  30. For n = 1 To 15
  31. Next n
  32. End If
  33.  
  34. MsgBox f
  35. End Sub
RAW Paste Data