srand(time(0));
const int size_a = 25;
const int size_b = size_a/2;
const int size_c = size_a - size_b;
int A[size_a]{};
int B[size_b]{};
int C[size_c]{};
int index_a = 0;
cout << "Massive A:" << endl;
for (size_t i = 0; i < size_a; i++)
{
cout << endl;
for (size_t i = 0; i < size_b; i++)
{
for (size_t i = 0; i < size_c; i++)
{
cout << endl << "Massive B:" << endl;
for (size_t i = 0; i < size_b; i++)
{
cout << endl << "Massive C:" << endl;
for (size_t i = 0; i < size_c; i++)
{
cout << endl;
system("pause");
const int size_a = 25;
const int size_b = size_a/2;
const int size_c = size_a - size_b;
int A[size_a]{};
int B[size_b]{};
int C[size_c]{};
int index_a = 0;
cout << "Massive A:" << endl;
for (size_t i = 0; i < size_a; i++)
{
A[i] = rand() % 101;}
cout << A[i] << "\t";
cout << endl;
for (size_t i = 0; i < size_b; i++)
{
B[i] = A[index_a];}
index_a++;
for (size_t i = 0; i < size_c; i++)
{
C[i] = A[index_a];}
index_a++;
cout << endl << "Massive B:" << endl;
for (size_t i = 0; i < size_b; i++)
{
cout << B[i] << "\t";}
cout << endl << "Massive C:" << endl;
for (size_t i = 0; i < size_c; i++)
{
cout << C[i] << "\t";}
cout << endl;
system("pause");
Комментариев нет:
Отправить комментарий