Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "iostream"
- #include "conio.h"
- using namespace std;
- int main()
- {
- int z, licz[26] = { 0 };
- do
- {
- cout << "Podaj litere: ";
- z = getchar();
- licz[z - 97]++;
- } while (getchar() != ' ');
- for (int i = 0; i <= 26; i++)
- {
- cout << char(i + 97) << " - " << licz[i] << " - ";
- if (licz[i] != 0)
- {
- for (int j = 1; j <= licz[i]; j++)
- cout << "#";
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement