Untitled
unknown
plain_text
2 years ago
698 B
2
Indexable
#include <fstream> #include <iostream> using namespace std; //ostream &operator<< (ostream& out,const aboba &a) { // out << a.name << " " << a.surname; // return out; //} /*struct TACHKA { char cvet; int mosh; string marka; string model; int pos; float obiom; int probeg; };*/ int main() { ifstream file("baba.txt"); ofstream res("res.txt"); int k,m=0; string a, b,temp="w"; file >> k; while (k != 0) { file >> a; k--; if (m < size(a)) { m = size(a); temp = a; } } cout << m<<endl<<temp; }
Editor is loading...