BeatificDevin

。。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
/*输入一个字符串实现逆序输出*/
#include <stdio.h>
#include <stdlib.h>

void print()
{
    char c;
    scanf("%c",&c);
    if(c != '#')
        print();
    if(c != '#')
        printf("%c",c);
}
int main()
{
    printf("请输入字符串,以#结束:\n");
    print();
    return 0;
}

  

posted on 2014-12-15 21:47  BeatificDevin  阅读(3740)  评论(0编辑  收藏  举报