Реферат: Курс I группа 517 Дисциплина: информатика. работа
For I = 1 To 7
Summa = Summa + MSFlexGrid1.TextMatrix(I, 2)
Next I
Текст2.Text = CSng(Summa)
‘РАСЧЕТ КОЭФФИЦИЕНТА “А”
Dim a As Single
a = Текст1.Text / Текст2.Text
Текст3.Text = CSng(a)
For I = 1 To 7
MSFlexGrid1.TextMatrix(I, 3) = Текст3.Text * MSFlexGrid1.TextMatrix(I, 2)
Next I
For I = 1 To 7
MSFlexGrid1.TextMatrix(I, 4) = Ccur(Sqr((((MSFlexGrid1.TextMatrix(I, 3) – MSFlexGrid1.TextMatrix(I, 1)) / MSFlexGrid1.TextMatrix(I, 1)) * 100) ^ 2))
Next I
‘СОРТИРОВКА
Dim min As Single
Dim max As Single
min = MSFlexGrid1.TextMatrix(7, 4)
‘НАХОЖДЕНИЕ MIN
For I = 1 To 7
If MSFlexGrid1.TextMatrix(I, 4) < min Then min = MSFlexGrid1.TextMatrix(I, 4)
Next I
Текст4.Text = CSng(min)
max = MSFlexGrid1.TextMatrix(1, 4)
‘НАХОЖДЕНИЕ MAX
For I = 1 To 7
If MSFlexGrid1.TextMatrix(I, 4) > max Then max = MSFlexGrid1.TextMatrix(I, 4)
Next I
Текст6.Text = CSng(max)