Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <conio.h>
- #include <string>
- #include <iostream>
- using namespace std;
- const int n = 26;
- char zn = 'a';
- int main()
- {
- int koleczka;
- cin >> koleczka;
- int t[n];
- for (int i=0; i<n; i++)
- {
- t[i] =0;
- }
- char *tekst;
- char cc;
- for (int i=0; i<koleczka; i++)
- {
- do
- {
- if (cc <= 'z')
- {
- if ( cc >= 'a') t[ cc -'a']++;
- }
- cc = getch();
- printf("%c", cc);
- } while (cc!=13);
- if (i != koleczka-1)
- {
- cout << endl;
- }
- }
- cout << endl;
- for (int i=0; i<n; i++)
- {
- if (t[i]!=0)
- {
- cout << zn << " " << t[i] << endl;
- }
- zn++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement