#include<string>
using namespace std;
int mian()
{
int num;
cin >> num;
string str;
while(num != 0)
{
char c = num%10 + '0';
num = num / 10;
str = str + c;
}
cout << str << endl;
return 0;
}
运行结果如下:
编译错误
编译错误:您提交的代码无法完成编译
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
全部评论
(2) 回帖