Guest User

Untitled

a guest
Sep 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main ()
  8. {
  9. string inhalt;
  10. int anzahl = 0;
  11. fstream f;
  12.  
  13. f.open("kunden.txt", ios::in);
  14. while(!f.eof())
  15. {
  16. getline (f, inhalt);
  17. if (inhalt == "")
  18. {
  19. anzahl++;
  20. }
  21. }
  22. cout << "Die Datei enth\204lt " << anzahl-1 << " Kunden.";
  23. }
Add Comment
Please, Sign In to add comment