Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string name_list[20];
- int num_names;
- cout << "How many numbers?" << endl;
- cin >> num_names;
- for (int subscript = 0; subscript < num_names; subscript++)
- {
- cout << "Enter number " << subscript << endl;
- cin >> name_list[subscript];
- }
- cout << "You entered: " << endl;
- for (int subscript = num_names - 1; subscript >= 0; subscript--)
- {
- cout << name_list[subscript] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement