Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<fstream>
- #include <string>
- #include <math.h>
- using namespace std;
- int main ()
- {
- string linia;
- int i, suma[13];
- ifstream plik("slowa.txt");
- if (plik.is_open())
- {
- for (int i=0;i<13;i++) suma[i] = 0;
- while (getline(plik, linia))
- {
- suma[linia.length()]++;
- }
- for (int i=1;i<13;i++)
- {
- cout<<i<<" "<<suma[i]<<endl;
- }
- }
- return 0;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement