rygyfygy

9.1

Apr 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5.  
  6.  
  7. string slowo;
  8. string tekst;
  9. int main()
  10. {INT MAIN()
  11. {
  12.     ofstream wejscie("tekst.txt");
  13.     ofstream wyjscie("wynilo2.txt");
  14.     int czestotliwosc[26];
  15.     for(int j=0; j<26; j++)
  16.     czestotliwosc[26]=0;
  17.     int suma=0;
  18.    
  19.     for(int i=0; i<1876; i++)
  20.     {
  21.         string slowo;
  22.         wejscie>>slowo;
  23.         for(int j=0; j<slowo.length(); j++)
  24.             czestotliwosc[slowo[j]-'A']++;
  25.         suma += slowo.length();
  26.     }
  27. }
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment