Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138223 hjx21113 元音字母转换 C++ Compile Error 0 MS 0 KB 467 2025-11-23 19:06:34

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int t; char a[50]; cin>>t; while (t--) { cin>>a; i=0; while (i<strlen(a)) { if (a[i]=='a' or a[i]=='e' or a[i]=='i' or a[i]=='o' or a[i]=='u') a[i]=a[i]-32; else if (a[i]=='A' or a[i]=='E' or a[i]=='I' or a[i]=='O' or a[i]=='U') ; else if (a[i]>='A' and a[i]<='Z') a[i]=a[i]+32; i++; } cout<<a<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:4: error: 'i' was not declared in this scope
    i=0;
    ^