sivan_iut

Untitled

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