왜안될까요??....

jheee Reply 9 years 32 weeks ago
#include <stdio.h> int b; int c=0; int a=0; char words1[3000]; char words2[3000]; int main() { while((c=getchar())!=EOF) { if( c!= '\n') {words1[a]=c; ++a; } else { for(b=0; b<=a-1; ++b) { words2[b] = words1[a-1-b]; putchar(words2[b]); } printf("\n"); a=0; } } return 0; }
pichulia Reply 9 years 32 weeks ago
EOF로 끝나는 마지막줄은 처리가 안되고있습니다.