Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "ru");
- int size;
- cout << "Введите размер массива: ";
- cin >> size;
- int* ptr = new int;
- int* arr = new int[size];
- for (int i = 0; i < size; i++) {
- arr[i] = rand() % 100;
- cout << arr[i] << " ";
- }
- delete ptr;
- delete[] arr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement