1

#include<stdio.h>
int main(void)
{
    int i,n;
    char str[120];
    i=0;
    while((str[i]=getchar())!='\n')
        i++;
    str[i]='\0';
    n=i;
    printf("%d\n",i);
    for(i=0;str[i]!='\0';i++)
        printf("%c ",str[i]);
    printf("\n");
    for(i=n-1;i>=0;i--)
        printf("%c",str[i]);
    printf("\n");
    return 0;
}

 

posted @ 2013-12-09 09:01  韵文  阅读(85)  评论(0编辑  收藏  举报