Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69621 殷震博 单词翻转 C++ Compile Error 0 MS 0 KB 256 2024-04-06 09:56:58

Tests(0/0):


Code:

lude<bits/stdc++.h> using namespace std; int main(){ string a; getline(cin,a); for(int i=0;i<=a.size();i++){ if(a[i]==' '){ for(int j=i-1;a[j]!=' ';j--){ cout<<a[j]; } } if(i==a.size()){ cout<<a[i]; } } return 0; }


Run Info:

Main.cc:1:1: error: 'lude' does not name a type
 lude
 ^
Main.cc: In function 'int main()':
Main.cc:4:2: error: 'string' was not declared in this scope
  string a;
  ^
Main.cc:5:10: error: 'cin' was not declared in this scope
  getline(cin,a);
          ^
Main.cc:5:14: error: 'a' was not declared in this scope
  getline(cin,a);
              ^
Main.cc:5:15: error: 'getline' was not declared in this scope
  getline(cin,a);
               ^
Main.cc:9:5: error: 'cout' was not declared in this scope
     cout<