Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- #include <string>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int main()
- {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- system("color 0A");
- string str("привет!");
- sort(str.begin(), str.end());
- cout << str << endl;
- cout << endl;
- vector<string> box;
- box.push_back("кошка");
- box.push_back("поле");
- box.push_back("высота");
- box.push_back("крот");
- box.push_back("топор");
- box.push_back("брод");
- box.push_back("пешеход");
- box.push_back("короб");
- sort(box.begin(), box.end());
- for (const auto &strng : box)
- {
- cout << strng << endl;
- }
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement