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