Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- int size;
- cout << "Enter array size: ";
- cin >> size;
- int *myRay = new int[size];
- for (int i = 0; i < size; i++) {
- int newInt;
- cout << "Enter number " << i + 1 << ": ";
- cin >> newInt;
- myRay[i] = newInt;
- }
- for (int i = 0; i < size; i++) {
- cout << myRay[i] << endl;
- }
- delete[] myRay;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement