Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6897 赖梓乐 06买鸡腿 C++ Compile Error 0 MS 0 KB 357 2025-03-23 14:27:30

Tests(0/0):


Code:

#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(){ cin a,b; int d,s,h; d=b/a; s=d/3; h=s+d; cout("%d\n",h); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:9: error: expected ';' before 'a'
     cin a,b;
         ^
Main.cc:8:12: warning: statement has no effect [-Wunused-value]
     cin a,b;
            ^
Main.cc:10:7: error: 'b' was not declared in this scope
     d=b/a;
       ^
Main.cc:10:9: error: 'a' was not declared in this scope
     d=b/a;
         ^
Main.cc:13:18: error: no match for call to '(std::ostream {aka std::basic_ostream}) (const char [4], int&)'
     cout("%d\n",h);
                  ^