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
7200 * 8 = 57600 Кбит
<span>57600 / 196,608= ~300 сек = ~5 мин
Ответ: 5 минут</span>
(5,5), (8,8), (9,8), (11,6), (12,7), (12,7), (11,7),
(11,2), (9,2), (9,3), (10,3), (10,4), (7,4), (7,2),
(5,2), (5,3), (6,3), (6,9), (7,9), (7,8), (2,8),
(2,9), (3,9), (3,6), (4,5)
#include <iostream>
using namespace std;
int main()
{
int A,B,C;
cout<<"Input A: "<<endl;
cin>>A;
cout<<"Input B: "<<endl;
cin>>B;
cout<<"Input C: "<<endl;
cin>>C;
if(A>0||B>0||C>0)
cout<<"An optional item is present"<<endl;
else
cout<<"There is no additional item"<<endl;
return 0;
}