Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
452 B
0
Indexable
Never
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    vector <string> vectorrr;

    ifstream in("input.txt");

    int i = 0;
    string str;
    in >> str;

    while (in >> str)
    {
        vectorrr.push_back(str);
        i++;
    }

    sort(vectorrr.begin(), vectorrr.end());
    for (int j = 0; j < i; j++) cout << vectorrr[j] << endl;
}