Advertisement
Radoan_Ahmed

Untitled

Aug 10th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a,x,i,count=0,j;
  5.     scanf("%d",&a);
  6.     for(j=0;j<=a;j++)
  7.     {
  8.     char str[1000];
  9.     gets(str);
  10.     x=strlen(str);
  11.     if(x>=10)
  12.     {
  13.         for(i=1;i<=x-2;i++)
  14.         {
  15.             count=count+1;
  16.         }
  17.         printf("%c%d%c\n",str[0],count,str[x-1]);
  18.         count=0;
  19.  
  20.     }
  21.     else
  22.     {
  23.         printf("%s\n",str);
  24.     }
  25.     }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement