CopyPastehas never been so tasty!

zada4a

by anonymous

  • 0
  • 0
  • 0
221 views

Option Base 1Option ExplicitPrivate Sub CmdПоменять_Click()'Объявление переменныхDim Snga(5, 2) As SingleDim Inti As Integer, Intj As IntegerDim SngМинимум As Single, Intn As IntegerCls'Ввод исходных данныхRandomize (Timer)For Inti = 1 To 5For Intj = 1 To 2Snga(Inti, Intj) = Int(Rnd * 10) + -3'Формирование матрицыPrint Snga(Inti, Intj); vbTab;Next IntjPrintNext IntiSngМинимум = Snga(1, 1): Intn = 1For Intj = 1 To 2For Inti = 1 To 5If SngМинимум > Snga(Inti, Intj) Then SngМинимум = Snga(Inti, Intj): Intn = IntiNext IntiNext IntjPrint String(25, "=")Print "Минимум="; SngМинимум; " "; "Номер строки="; IntnPrint String(25, "=")Dim Sngt As SingleFor Intj = 1 To 2Sngt = Snga(5, Intj): Snga(5, Intj) = Snga(Intn, Intj): Snga(Intn, Intj) = SngtNext Intj
For Inti = 1 To 5For Intj = 1 To 2If Inti = 5 Or Inti = Intn Then Me.ForeColor = vbRed'Вывод результатаPrint Snga(Inti, Intj); vbTab;Me.ForeColor = 0Next IntjPrintNext IntiEnd Sub

Add A Comment: