#include <iostream>
#include <fstream>
using namespace std;

int main()
{
   ofstream out("witz.txt");
   out<<"Es kommt ein Mann zum Baecker und sagt: Ich moechte 99 Broetchen."<<endl;
   out<<"Da fragt der Baecker: Duerfen es auch 100 sein?"<<endl;
   out<<"Der Mann antwortet: Nein, wer koennte denn so viele essen?"<<endl;
   out.close();

   ifstream in("witz.txt");
   while(!in.eof())
   {
      char ch;
      in>>ch;
      cout<<ch;
   }
   in.close();

   ifstream input("witz.txt");
   cout << endl;
   while(!input.eof())
   {
      char ch;
      ch=input.get();
      cout<<ch;
   }
   input.close();
 
   return 0;
}