Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
596 B
0
Indexable
Never
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
	setlocale(LC_ALL, "ru");
	ifstream in("bebra.txt");
	vector<string> abo;
	string aboba;
	string a; int max = 0, imac=0, p;
	for (int i = 1; getline(in, a); i++)
	{
		abo.push_back(a);
		if (a.size() > max) 
		{
			max = a.size();
			imac = i;
			aboba = a;
		}
	}
	cout <<" Самый биг слово: " << aboba << endl;
	sort(abo.begin(), abo.begin() + imac);
	for (int i = 0; i < abo.size(); i++)
	{
		cout << abo[i] << " ";
	}
}