srand(time(0));
const int size = 20;
int A[size]{};
for (size_t i = 0; i < size; i++)
{
cout << endl;
int summ = 0;
bool rele = false;
for (size_t i = 0; i < size; i++)
{
cout << "Summ = " << summ << endl;
system("pause");
const int size = 20;
int A[size]{};
for (size_t i = 0; i < size; i++)
{
A[i] = rand() % 41-10;}
cout << A[i] << "\t";
cout << endl;
int summ = 0;
bool rele = false;
for (size_t i = 0; i < size; i++)
{
if (A[i] >= 0 || rele == true)}
continue;else
{
rele = true;}
cout << i << "\t";
for (size_t j = i; j < size; j++)
{
summ += A[j];}
cout << "Summ = " << summ << endl;
system("pause");
Комментариев нет:
Отправить комментарий