Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
75302 邓昊源 十进制转二进制 C++ Compile Error 0 MS 0 KB 259 2024-05-26 16:31:08

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int s[32],sum = 0; int x; cin >> x; while(x!=0){ int y = x % 2; s[sum] = y; sum++; x/=2; } for(int i = sum - 1;i >= 0;i--){ cout << s[i]; } } return 0; }


Run Info:

Main.cc:19:2: error: expected unqualified-id before 'return'
  return 0;
  ^
Main.cc:20:1: error: expected declaration before '}' token
 }
 ^