Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148908 周润泽 元音字母转换 C++ Compile Error 0 MS 0 KB 464 2026-03-01 20:38:00

Tests(0/0):


Code:

4#include<iostream> #include<cstring> using namespace std; int main(){ int x[200]={0}; x['a']=1,x['e']=1,x['i']=1,x['o']=1,x['u']=1; string s,s1; int t; cin>>t; cin.get(); for(int j=0;j<t;j++){ cin>>s; for(int i=0;i<s.size();i++){ if(x[s[i]]) s[i]-=32; else if(!x[s[i]+32]&&'A'<=s[i]&&s[i]<='Z') s[i]+=32; } s1 = s; cout<<s1<<endl; } return 0 }


Run Info:

Main.cc:1:2: error: stray '#' in program
 4#include
  ^
Main.cc:1:1: error: expected unqualified-id before numeric constant
 4#include
 ^
Main.cc: In function 'int main()':
Main.cc:7:5: error: 'string' was not declared in this scope
     string s,s1;
     ^
Main.cc:9:5: error: 'cin' was not declared in this scope
     cin>>t;
     ^
Main.cc:12:14: error: 's' was not declared in this scope
         cin>>s;
              ^
Main.cc:17:9: error: 's1' was not declared in this scope
         s1 = s;
         ^
Main.cc:18:9: error: 'cout' was not declared in this scope
         cout<