srand(time(0));
const int size_a = 20;
const int size_b = size_a;
int A[size_a]{};
int B[size_b]{};
for (size_t i = 0; i < size_a; i++)
{
cout << endl;
cout << endl;
int index = 0;
for (size_t i = 0; i < size_b; i++)
{
for (size_t i = 0; i < size_a; i++)
{
for (size_t i = 0; i < size_a; i++)
{
for (size_t i = 0; i < size_b; i++)
{
cout << endl;
system("pause");
const int size_a = 20;
const int size_b = size_a;
int A[size_a]{};
int B[size_b]{};
for (size_t i = 0; i < size_a; i++)
{
A[i] = rand() % 101-50;}
cout << A[i] << " ";
cout << endl;
cout << endl;
int index = 0;
for (size_t i = 0; i < size_b; i++)
{
if (A[i] < 0)}
{
B[index] = A[i];}
index++;
for (size_t i = 0; i < size_a; i++)
{
if (A[i] == 0)}
{
B[index] = A[i];}
index++;
for (size_t i = 0; i < size_a; i++)
{
if (A[i] > 0)}
{
B[index] = A[i];}
index++;
for (size_t i = 0; i < size_b; i++)
{
cout << B[i] << " ";}
cout << endl;
system("pause");
Комментариев нет:
Отправить комментарий