Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- srand(time(NULL));
- int size;
- cout << "Enter size: ";
- cin >> size;
- int* arr = new int[size]; // динамическое выделение памяти
- for (int i = 0; i < size; i++) {
- arr[i] = rand() % 100;
- cout << arr[i] << " ";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement