Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5.  
  6. int main ()
  7. {
  8. int wynik=0;
  9. fstream odczytaj("tralalalala.txt");
  10. char ymary;
  11. while(odczytaj>>ymary)
  12. {
  13. if (ymary=='a')
  14. {
  15. wynik++;
  16. }
  17. }
  18. cout<<"wynik to:"<<wynik<<endl;
  19.  
  20.  
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement