变成基本功——递归反向输出字符串
源码:
1: #include <stdio.h>
2:
3: void Print()
4: {
5: char a;
6: scanf("%c", &a);
7:
8: if (a != '#')
9: Print();
10: if (a != '#')
11: printf("%c", a);
12: }
13:
14: int main()
15: {
16: printf("Input a string\n");
17: Print();
18: return 0;
19: }