fork download
  1. #include<iostream>
  2. #include<string.h>
  3. using namespace std;
  4. int main()
  5. {
  6. int n;
  7. char s[101];
  8. cin >> n;
  9. for(int i=0;i<n;i++)
  10. {
  11. fflush(stdin);gets(s);
  12. if (strlen(s) <=10)
  13. cout << s << endl;
  14. else
  15. cout << s[0] << strlen(s)-2 << s[strlen(s)-1] << endl;
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:23: error: ‘gets’ was not declared in this scope
   fflush(stdin);gets(s);
                       ^
stdout
Standard output is empty