Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- { string a;
- int wynik=0;
- cout << "licze ile liter a jest w tekscie" << endl;
- ifstream odczyt ("dane.txt");
- if (odczyt.is_open())
- { char znak;
- while (odczyt>>znak)
- {
- if(znak=='a')
- {
- wynik=wynik+1;
- }
- znak=znak+1;
- }
- cout<<wynik;
- cin.get();
- odczyt.close();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement