Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137080 傅嘉琦 能否被3和5整除 C++ Compile Error 0 MS 0 KB 194 2025-11-16 10:59:40

Tests(0/0):


Code:

#include <iostream> using namespance std; int main(){ int n; cin>>n; if(n%3==0&&n%5==0) { cout <<"can"<<endl; } else { cout <<"cannot"<<endl; } return 0; }


Run Info:

Main.cc:2:7: error: expected nested-name-specifier before 'namespance'
 using namespance std;
       ^
Main.cc: In function 'int main()':
Main.cc:5:2: error: 'cin' was not declared in this scope
  cin>>n;
  ^
Main.cc:5:2: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:8:6: error: 'cout' was not declared in this scope
      cout <<"can"<& __os)
     ^
Main.cc:12:6: error: 'cout' was not declared in this scope
      cout <<"cannot"<& __os)
     ^