Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- #include <string>
- #include <algorithm>
- using namespace std;
- int main()
- {
- int z = 0;
- string name[10];
- cout<<"Enter 10 words: \n";
- for (int x = 0; x<10; x++){
- cin>>name[x];
- }
- sort(begin(name),end(name));
- cout<<"Here are the words ";
- for(auto n: name){
- cout << n << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement