Advertisement
Guest User

Untitled

a guest
May 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5. int main()
  6. {
  7. string str, result;
  8. cin >> str;
  9.  
  10. result = str;
  11. if (str.size() > 10)
  12. {
  13. result = str[0];
  14. result += to_string(str.size() - 2);
  15. result += str[(str.size() - 1)];
  16. }
  17. cout << result << endl;
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement