Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82392 赵文浚 31统计单词数 C++ Compile Error 0 MS 0 KB 227 2024-07-13 11:12:59

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespase std; int main() { strig a; getline(cin,a); int =a.length(),c=0; for(int i=0;i<b;i++) { if(a[i]==' '&&a[i+1]!=' '&&[i-1]!=0) { c++; } } cout<c; return 0; }


Run Info:

Main.cc:2:7: error: expected nested-name-specifier before 'namespase'
 using namespase std;
       ^
Main.cc: In function 'int main()':
Main.cc:5:2: error: 'strig' was not declared in this scope
  strig a;
  ^
Main.cc:6:10: error: 'cin' was not declared in this scope
  getline(cin,a);
          ^
Main.cc:6:10: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:74:0,
                 from Main.cc:1:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:6:14: error: 'a' was not declared in this scope
  getline(cin,a);
              ^
Main.cc:7:6: error: expected unqualified-id before '=' token
  int =a.length(),c=0;
      ^
Main.cc:8:16: error: 'b' was not declared in this scope
  for(int i=0;i' and 'int')
Main.cc:12:4: error: 'c' was not declared in this scope
    c++;
    ^
Main.cc:15:2: error: 'cout' was not declared in this scope
  cout