Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
348 B
1
Indexable
Never
#include <iostream>
using namespace std;
int asd(int m[], const int size, int a, int b)
{
	for (int i = 0; i < size; i++)
	{
		m[i] = rand() % (b-a+1) + a;
		cout << m[i] << endl;
	}
	return 0;
}
int main()
{
	srand(time(0));
	const int N = 1000;
	int mas[N];
	int n;
	cin >> n;
	int a, b;
	cin >> a >> b;
	asd(mas, n, a, b);
}
Leave a Comment