Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
108077 刘泽熙 十进制转二进制 C++ Compile Error 0 MS 0 KB 209 2025-01-19 14:21:41

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int y[32]; itn cnt =0; int main(){ long long n; cin>>n; while(1){ int yu=n%2; y[cnt]=yu; cnt++; n=n/2; if(n==0){ break; } } }


Run Info:

Main.cc:4:1: error: 'itn' does not name a type
 itn cnt =0;
 ^
Main.cc: In function 'int main()':
Main.cc:10:5: error: 'cnt' was not declared in this scope
   y[cnt]=yu;
     ^