#include <stdio.h> #include <string.h> int main() { char buf[500]; int i, len; printf("입력:"); gets( buf); len=strlen(buf); printf(" input = %s \n", buf); i=len; while(i>0) { i-=1; if(buf[i]<0){ printf("%c%c", buf[i-1], buf[i]); i-=1; } else printf("%c", buf[i]); } return 0; }