Ответ:
#include
#include
using namespace std;
#define n 15
int main()
{
int s = 0;
int a[n];
srand((unsigned)time(NULL));
cout
for (int i = 0; i < n; i++)
{
a[i] = (rand() % 251) - 150;
cout
if ((a[i] % 2 != 0) && (a[i] % 3 == 0))
s += a[i];
}
cout
return 0;
}