include vcl include iostream void main int mas int sum int size_mas si

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#include <vcl.h>
#include <iostream.h>
void main()
{
int mas[]={4, 8, 3, 2, 0 , 7, 9, 5, 5};
int i, sum;
int size_mas = sizeof(mas)/sizeof(mas[0]);
sum = 0;
for(i = 0; i < size_mas; i++)
{
sum += mas[i];
}
cout << "Summa = " << sum;
cin.get();
}