Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Public Class Form1
  2. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  3. Dim x(,) As Single
  4. Dim i, j As Integer
  5. i = InputBox("stolbi")
  6. j = InputBox("stroki")
  7. ReDim x(i, j)
  8. inputstiker(x)
  9. outputstiker(x, TextBox1)
  10. TextBox1.AppendText(vbCrLf)
  11. ochen(x)
  12. End Sub
  13. Private Sub inputstiker(ByRef h(,) As Single, Optional ByVal Arrayname As String = "hochy")
  14. Dim i, j As Integer
  15. For i = 1 To h.GetUpperBound(0)
  16. For j = 1 To h.GetUpperBound(1)
  17. h(i, j) = InputBox(Arrayname & "(" & i & "," & j & ")")
  18. Next
  19. Next
  20. End Sub
  21. Private Sub outputstiker(ByRef a(,) As Single, ByVal z As TextBox)
  22. Dim i, j As Integer
  23. For i = 1 To a.GetUpperBound(0)
  24. For j = 1 To a.GetUpperBound(1)
  25. z.AppendText(a(i, j) & vbTab)
  26. Next
  27. z.AppendText(vbCrLf)
  28. Next
  29. End Sub
  30. Private Sub ochen(ByRef c(,) As Single)
  31. Dim i, j As Integer
  32. For i = 1 To c.GetUpperBound(0)
  33. For j = 1 To c.GetUpperBound(1)
  34. TextBox1.AppendText(c(j, i) & vbTab)
  35. Next
  36. TextBox1.AppendText(vbCrLf)
  37. Next
  38.  
  39. End Sub
  40. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement