Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include "string"
- using namespace std;
- char b[10000];
- int main()
- {
- string text("dewfgvecevqbrevnlvnlervnaaa");
- int *a = new int[text.length()];
- int k ='z';
- for (int i = 0; i <text.length(); i++)
- {
- a[i]=(int)text[i];
- }
- for (char i = 0; i < text.length(); i++)
- {
- b[a[i]]++;
- }
- for (char i = 0; i < k; i++)
- {
- for (int j = 0; j < b[i]; j++)
- cout << (char)i;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement