#include #include #include int main(void) { ifstream fi("elukat.txt"); ofstream fo("elu.txt"); string s; while ( 1 ) { if ( !getline(fi,s) ) break; cout << s << "\n"; if ( s[0] == 'K' ) fo << s << "\n"; } return 0; }