Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "List.h"
- using namespace std;
- int main()
- {
- List randomList;
- List userList;
- List mergedList;
- for (int i = 0; i < 5; ++i)
- {
- randomList += rand() % 10;
- }
- cout << "<User list input>" << endl;
- int value = 0;
- for (int i = 0; i < 5; ++i)
- {
- cin >> value;
- userList += value;
- }
- cout << endl << "<Merge list input>" << endl;
- for (int i = 0; i < 5; ++i)
- {
- cin >> value;
- mergedList += value;
- }
- mergedList.merge(userList);
- cout << endl << "Random list:" << endl << randomList << endl;
- cout << "User list:" << endl << userList << endl;
- cout << "Merged list:" << endl << mergedList << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement