# 求助大佬们

P5705 【深基2.例7】数字反转

界内嘻哈 @ 2020-05-11 17:08:11

在VS编译器没问题

为什么通不过啊在这儿

#include<bits/stdc++.h>

int main()
{
    char s[200];
    int i;
    gets(s); 
    for(i = strlen(s)-1; i >= 0; i--)
    {
        printf("%c",s[i]);
    }
    return 0;
 } 

by Surelysuper @ 2020-05-11 17:09:01

别用gets


by TensorFlow_js @ 2020-05-11 17:09:16

cstdio头文件?


by Surelysuper @ 2020-05-11 17:09:45

@MOJANG 有万能头了


by TensorFlow_js @ 2020-05-11 17:11:21

@蒟蒻跟风侠 眼瞎


by TensorFlow_js @ 2020-05-11 17:11:37

@界内嘻哈 cin>>

AC


by Surelysuper @ 2020-05-11 17:11:43

@MOJANG 可海星


by Surelysuper @ 2020-05-11 17:12:31

string+cin不香吗?


by TensorFlow_js @ 2020-05-11 17:12:43

@MOJANG oo错了,std::cin>>


by 界内嘻哈 @ 2020-05-11 17:24:24

感谢你们


by Cult_style @ 2020-05-11 18:55:57

@界内嘻哈 把get改成scanf("%s",s);


|