Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99913 | 任斌 | 十进制转二进制 | C++ | Compile Error | 0 MS | 0 KB | 390 | 2024-12-01 10:48:43 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main() { int x,y[20]={0},s; cin>>x; int i=0; if(x==0)cout<<0; while(x!=0){ y[i]=x%2; x/=2; i++; } for(int j=i-1;j>=0;j--){
Main.cc: In function 'int main()': Main.cc:18:25: error: expected '}' at end of input for(int j=i-1;j>=0;j--){ ^ Main.cc:9:18: warning: unused variable 's' [-Wunused-variable] int x,y[20]={0},s; ^ Main.cc:18:25: error: expected '}' at end of input for(int j=i-1;j>=0;j--){ ^