Advertisement
apl-mhd

CodeForcesWayOFLongWord

Nov 8th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1.  
  2. #include <string.h>
  3. #include <stdio.h>
  4.  
  5.  
  6.  
  7.  
  8. int main(int argc, char *argv[])
  9. {
  10.  
  11.  
  12.     char word[200];
  13.     int size,i, length;
  14.  
  15.     scanf("%d",&length);
  16.  
  17.     for(i=0; i<length;i++){
  18.  
  19.         scanf("%s",&word);
  20.  
  21.  
  22.  
  23.     size = strlen(word);
  24.  
  25.     if(size >10)
  26.  
  27.         printf("%c%d%c\n",word[0],size-2, word[size-1]);
  28.     else
  29.         printf("%s\n",word);
  30. }
  31.  
  32.     return 0 ;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement