Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
4644 高振轩 能否被3和5整除 C++ Compile Error 0 MS 0 KB 164 2024-08-25 17:12:07

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,n; cin>>a; if(a%3==0&&a%5=0){ cout<<"can"<<endl; } else{ cout"cannot"<<endl; } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:16: error: lvalue required as left operand of assignment
  if(a%3==0&&a%5=0){
                ^
Main.cc:10:7: error: expected ';' before string constant
   cout"cannot"<endl;
       ^
Main.cc:10:21: warning: statement has no effect [-Wunused-value]
   cout"cannot"<<endl;
                     ^
Main.cc:4:8: warning: unused variable 'n' [-Wunused-variable]
  int a,n;
        ^