Untitled

 avatar
unknown
plain_text
2 years ago
596 B
4
Indexable
#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] << " ";
	}
}
Editor is loading...