标签:std eve input def reverse 键盘 strlen 输入 ever
1 #include <stdio.h> 2 void reverse(char s[]) 3 { 4 int len; 5 len = strlen(s); 6 7 if (len == 1) 8 { 9 printf("%c", s[0]); 10 } 11 else 12 { 13 reverse(s + 1); 14 printf("%c", s[0]); 15 } 16 } 17 main() 18 { 19 char s[100]; 20 21 printf("input your string:\n"); 22 scanf("%s", s); 23 reverse(s); 24 }
标签:std eve input def reverse 键盘 strlen 输入 ever
原文地址:https://www.cnblogs.com/20201212ycy/p/14698034.html