题解 | #字符串反转#

字符串反转

http://www.nowcoder.com/practice/e45e078701ab4e4cb49393ae30f1bb04

数字翻转的第二种解法:
#include <stdio.h>
int main(){
    char a[1000];
    scanf("%s",a);
    for(int i = strlen(a) - 1; i >= 0; i--){
        printf("%c",a[i]);
    }
    return 0;
}

全部评论

相关推荐

双尔:你就写拥有ai开发经历,熟练运用提示词,优化ai,提高ai回答质量
点赞 评论 收藏
分享
评论
点赞
2
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务