Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69562 李琥博 单词翻转 C++ Compile Error 0 MS 0 KB 395 2024-04-05 16:44:00

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:20: error: expected ')' before '!' token
             if(s[i]!>='a'&&s[i]!<='z'){
                    ^