Quick actions

cmd+k|ctrl+k

Navigation

Languages

192

Snippet info

Language

Cpp

Visibility

public

Author

nxnxngh

Created

2018-11-11T17:33:36Z

Updated

2018-11-27T13:52:15Z

#include <iostream>
using namespace std;

int main() {
    setlocale(LC_ALL, "ru");
	srand(time(NULL));
//ВТОРОЙ МАССИВ222222222222222222222222222222222222222222
	int suze = 2 + rand() % 8;
	int *arr = new int[suze];
	cout << "Размер = " << suze << endl;
	for (int i = 0; i < suze; i++)
	{
		arr[i] =rand() % 50;
		cout << arr[i] << "\t";
	}
	cout << endl << endl << endl;
//ТРЕТИЙ МАССИВ3333333333333333333333333333333333333333333333
	int suzee = 2 + rand() % 8;
	int *arrayy = new int[suzee];
	cout << "Размер = " << suzee << endl;
		for (int i = 0; i < suzee; i++)
	{
	    int n = rand()%suze;
		arrayy[i] =arr[n];
		cout << arrayy[i] << "\t";
	}
	cout << endl << endl << endl;
	///////////////////////////////////////////////////////////////
    return 0;
}
INFO