将输入的字符串按逆序输出,例如输入abcd,则按dcba顺序输出出来,请完善程序。#include #include int main( ){ char *str, s[20]; int n; str=s; scanf("%s",str); n=strlen(str); while(--n>=0) { str=&s[____]; printf("%c",*str); } return 0;}
发布时间:2024-06-08 22:54:30