Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ConsoleApplication1.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int _tmain(int argc, _TCHAR* argv[])
- {
- ifstream plik("dane.txt");
- ofstream plikout("wynik.txt");
- int licznik=0;
- if (plik){
- while (!plik.eof()){
- //czakaorn
- string dupa;
- int rozmiar;
- plik>>dupa;
- rozmiar=dupa.length()-1;
- if (dupa[0]==dupa[rozmiar]){
- licznik++; //szmato
- }
- //czaokrona
- }
- cout<<licznik;
- }
- system("pause");
- plikout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement