Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main()
- {
- ifstream labki;
- ofstream dupa;
- string mati;
- labki.open("Text.txt");
- char c, a, t;
- char d;
- int CAT = 0;
- int pozycja;
- dupa.open("Text1.txt");
- while (labki.get(d))
- {
- if (d == 'C')
- {
- dupa.put('B');
- }
- else
- {
- dupa.put(d);
- }
- }
- labki.close();
- labki.open("Text.txt");
- while (labki.get(c))
- {
- if (c == 'C')
- {
- labki.get(a);
- if (a == 'A')
- {
- labki.get(t);
- {
- if (t == 'T')
- {
- CAT++;
- }
- }
- }
- }
- }
- dupa.close();
- labki.close();
- cout << CAT;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement