Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
107559 田诗语 05交换数据 C++ Compile Error 0 MS 0 KB 435 2025-01-18 10:11:44

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a=3,b=5,c; c=a; a=b; b=c; cout<<a<<" "<<b; return #include<iostream> using namespace std; int main(){ int a=3,b=5,c; c=a; a=b; b=c; cout<<a<<" "<<b; return 0; }0; }#include<iostream> using namespace std; int main(){ int a=3,b=5,c; c=a; a=b; b=c; cout<<a<<" "<<b; return 0; }


Run Info:

Main.cc:9:12: error: stray '#' in program
     return #include  
            ^
Main.cc:19:2: error: stray '#' in program
 }#include  
  ^
Main.cc: In function 'int main()':
Main.cc:9:13: error: 'include' was not declared in this scope
     return #include  
             ^
Main.cc:9:29: error: expected primary-expression before '>' token
     return #include  
                             ^
Main.cc:10:1: error: expected primary-expression before 'using'
 using namespace std;
 ^
Main.cc:10:1: error: expected ';' before 'using'
Main.cc:11:11: error: a function-definition is not allowed here before '{' token
 int main(){
           ^
Main.cc:18:3: warning: statement has no effect [-Wunused-value]
 }0;
   ^
Main.cc: At global scope:
Main.cc:19:3: error: 'include' does not name a type
 }#include  
   ^
Main.cc: In function 'int main()':
Main.cc:21:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:3:5: note: 'int main()' previously defined here
 int main(){
     ^