Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <time.h>
- using namespace std;
- int main() {
- srand(time(NULL));
- cout << "Enter count num: ";
- int num;
- cin >> num;
- int* pNum = new int[num];
- for (int i = 0; i < num; i++) {
- *(pNum + i) = rand() % 100;
- cout << *(pNum + i) << " ";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement