wrong output format Unexpected end of file — token expected----i compiled in ideone and my ide on right but in place it notified so, can you help me, thank

Revision en1, by N-H-T, 2016-10-31 16:41:00

include <stdio.h>

include <malloc.h>

include <string.h>

int main() { int n, i, j; char st[100][101]; char sc[][2]={"0","1","2","3","4","5","6","7","8","9"}; scanf("%d",&n); for(i=0;i<=n;i++) { fflush(stdin); gets(st[i]); } for(i=0;i<=n;i++) { char sm[5]="\0"; if(strlen(st[i]) > 10) { j = strlen(st[i]) — 2; if(j==9) { sm[0] = st[i][0]; sm[1] = sc[9][0]; sm[2] = st[i][strlen(st[i])-1]; sm[3] = '\0'; printf("%s\n",sm); } else { int k = j%10; j=j/10; sm[0] = st[i][0]; sm[1] = sc[j][0]; sm[2] = sc[k][0]; sm[3] = st[i][strlen(st[i])-1]; sm[4] = '\0'; printf("%s\n",sm); } } else printf("%s\n",st[i]); } return 0; }

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English N-H-T 2016-10-31 17:00:54 866 problem http://codeforces.me/problemset/problem/71/A
en1 English N-H-T 2016-10-31 16:41:00 928 problem http://codeforces.me/problemset/problem/71/A (published)