Guest User

Untitled

a guest
May 22nd, 2019
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub five()
  2. Dim n As Integer, s As String, f As String, TableC(8) As Integer, TableB(8) As Integer, k As String
  3.  
  4. For n = 1 To 8
  5. TableC(n) = Rnd * 25
  6. Next n
  7.  
  8. For n = 1 To 8
  9. s = s & TableC(n) & " "
  10. Next n
  11.  
  12. For n = 1 To 8
  13. TableB(n) = Rnd * 25
  14. Next n
  15.  
  16. For n = 1 To 8
  17. k = k & TableB(n) & " "
  18. Next n
  19.  
  20. For n = 1 To 8
  21. If TableC(n) / 5 = TableC(n) \ 5 Then
  22. TableB(n) = TableB(n) * 5
  23. End If
  24. If TableC(n) \ 5 = TableC(n) / 5 Then
  25. TableB(n) = 0
  26. End If
  27. f = f & TableB(n) & " "
  28. Next n
  29.  
  30. MsgBox "C(8) = " & s & vbNewLine & vbNewLine & "B(8) = " & k & vbNewLine & vbNewLine & "B(8) изменённое = " & f
  31. End Sub
RAW Paste Data