Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- int a[10] = {0,0,0,0,0,0,0,0,0,0}, i = 0;
- string s;
- cin >> s;
- while (s[i] != '.') {
- a[int(s[i])-48]++;
- i++;
- }
- for (int m = 1; m <= 10; m++) {
- for (int j = 0; j < 10; j++) {
- if (a[j] == m) cout << j;
- }
- }
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement