#include <iostream>
#include <fstream>

using namespace std;

main()
{
	ifstream inf("tokovi2.cpp");
	ofstream outf("izlaz.txt");
	
	while(1){
		char c = inf.get();
		if( !inf )
			break;
		outf.put(c);
	}
	
	outf.close();
	outf.open("izlaz2.txt");
	inf.clear( ios::eofbit );
	inf.seekg(0);

	while(1){
		char c;
		inf >> c;
		if( !inf )
			break;
		outf << c;
	}
	outf.close();
	
	return 0;	
}
