1В)2А)3Г)4В)5А)6Г)7Г)8В)9Г)10А)11А)12А)13Б)14А)15Г)16В)17В)18Г)
Sub Calculate()
Dim coll As Collection
Dim i As Integer
Dim sum As Double
Dim negative As Integer
Dim composition As Integer
negative = 0
composition = 1
Set coll = New Collection
sum = 0
n = CInt(InputBox("Введите количество чисел", "Ввод", "", 2000, 2000))
For i = 1 To n
elmnt = CInt(InputBox(i & " число", "Ввод", "", 2000, 2000))
coll.Add elmnt
sum = sum + elmnt
Next i
For i = 1 To coll.Count
If (coll.Item(i) < 0) Then
negative = negative + 1
End If
If (coll.Item(i) Mod 2 = 1) Then
composition = composition * coll.Item(i)
End If
Next i
MsgBox "Количество отрицательных = " & negative & vbCrLf & "Произведение нечетных = " & composition & vbCrLf, vbOKOnly, "Результаты"
End Sub
Program n1;
var a,b,c: real;
sum,p,ps: real;
begin
write('введите 1 число: ');
readln(a);
write('введите 2 число: ');
readln(b);
write('введите 3 число: ');
readln(c);
sum:=a+b+c;
p:=a*b*c;
ps:=sum/3;
writeln('сумма: ',sum);
writeln('произведение: ',p);
writeln('ср. арифмитическое: ',ps);
end