Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- #include <iostream>
- #include <algorithm>
- #include <cstdlib>
- #include <ctime>
- #include <string>
- using namespace std;
- int main()
- {
- srand(time(NULL));
- vector<int> num;
- vector<string> vocab;
- for (int b = 0; b <= 20; b++)
- {
- cout << b << ' ';
- }
- cout << endl;
- for (int i = 0; i <= 20; i++)
- {
- num.push_back(rand() % 101);
- }
- for (int j = 0; j <= 20; j++)
- {
- cout << num[j] << ' ';
- }
- cout << endl;
- sort(num.begin(), num.end());
- for (int k = 0; k <= 20; k++)
- {
- cout << num[k] << ' ';
- }
- cout << endl;
- vocab.push_back("deck"); // 0
- vocab.push_back("zebra"); // 1
- vocab.push_back("arkham"); // 2
- vocab.push_back("batman"); // 3
- vocab.push_back("robin"); // 4
- vocab.push_back("catwoman"); // 5
- vocab.push_back("superman"); // 6
- vocab.push_back("canary"); // 7
- vocab.push_back("spiderman"); // 8
- vocab.push_back("vulture"); // 9
- vocab.push_back("crow"); // 10
- vocab.push_back("wind"); // 11
- vocab.push_back("earth"); // 12
- vocab.push_back("fire"); // 13
- vocab.push_back("water"); // 14
- vocab.push_back("names"); // 15
- vocab.push_back("dates"); // 16
- vocab.push_back("times"); // 17
- vocab.push_back("life"); // 18
- vocab.push_back("love"); // 19
- vocab.push_back("confidence"); // 20
- for (int l = 0; l <= 20; l++)
- {
- cout << vocab[l] << ' ';
- }
- cout << endl;
- sort(vocab.begin(), vocab.end());
- for(int m = 0; m <= 20; m++)
- {
- cout << vocab[m] << ' ';
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment