Guest User

Untitled

a guest
Nov 17th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. int main()
  5. {
  6. char str[1000]= {'\0'};
  7. int i, input, l;
  8.  
  9. scanf("%d", &input);
  10. getchar();
  11.  
  12. for(i=1;i<=input;i++)
  13. {
  14.  
  15. gets(str);
  16.  
  17. l= strlen(str);
  18.  
  19. if (l<11)
  20. printf("%s\n",str);
  21.  
  22. else
  23. printf("%c%d%c\n",str[0], l-2, str[l-1]);
  24.  
  25.  
  26. }
  27.  
  28.  
  29. return 0;
  30. }
Add Comment
Please, Sign In to add comment