include vcl include iostream void main int mas int mas_2 int sum int s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <vcl.h>
#include <iostream.h>
void main()
{
int mas[] = {4, 8, 3, 2, 0 , 7, 9, 5, 5};
int mas_2[9];
int i, j, sum;
int size_mas = sizeof(mas)/sizeof(mas[0]);
for (i = 0; i < size_mas; i++)
{
mas_2[size_mas - i] = mas[i];
}
for (j=0; j < size_mas; j++)
{
if(mas_2[j] % 2 == 0)
{
sum += mas_2[j];
}
cout << mas_2[j] << ", ";
}
cout << "Summa = " << sum;
cin.get();
}