Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub zadanie2()
  2.  
  3. Dim x As Integer
  4. Dim sum As Integer
  5. Dim n As Integer
  6. Dim col As Integer
  7.  
  8. Dim message, title, defaultValue As String
  9.  
  10. message = "Wwedite chislo"
  11. title = "Wwedite chislo"
  12. defaultValue = "0"   ' Set default value.
  13.  
  14. n = 0
  15. sum = 0
  16. col = 0
  17. x = InputBox(message, title, defaultValue)
  18.  
  19. While x <> 0
  20.     If x Mod 5 = 0 And x Mod 7 <> 0 Then
  21.         sum = sum + x
  22.         col = col + 1
  23.     End If
  24.     x = InputBox(message, title, "123")
  25. Wend
  26.  
  27. MsgBox (sum)
  28. MsgBox (col)
  29.  
  30. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement