#include <iostream>
using namespace std;
int main()
{
int mass[4][5];
int sum = 0;
for (int i=0; i<4; i++)
for(int g=0; g<5; g++)
mass[i][g] = rand() % 10;
for (int i=1; i<4; i+=2)
sum+=mass[i][g];
cout<<sum;
return 0;
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main()
{
int mass[4][5];
int sum = 0;
for (int i=0; i<4; i++)
for(int g=0; g<5; g++)
mass[i][g] = rand() % 10;
for (int i=1; i<4; i+=2)
for(int g=0; g<5; g++)
sum+=mass[i][g];
cout<<sum;
return 0;
}