Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main (void)
- {
- ifstream ins("input.txt");
- string S;
- int k=0;
- while (getline(ins,S))
- if (S[0]==S[S.size()-1])
- k++;
- cout << k << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment