srand(time(0));
const int size = 10;
int A[size]{};
for (size_t i = 0; i < size; i++)
{
cout << endl;
for (size_t i = 0; i < size/2; i++)
{
for (size_t i = 0; i < size; i++)
{
cout << endl;
system("pause");
const int size = 10;
int A[size]{};
for (size_t i = 0; i < size; i++)
{
A[i] = rand() % 101;}
cout << A[i] << " ";
cout << endl;
for (size_t i = 0; i < size/2; i++)
{
A[i] += A[size-i-1];}
A[size - i - 1] = A[i] - A[size - i - 1];
A[i] = A[i] - A[size - i - 1];
for (size_t i = 0; i < size; i++)
{
cout << A[i] << " ";}
cout << endl;
system("pause");
Комментариев нет:
Отправить комментарий