Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
73318 刘焕群 字符替换 C++ Compile Error 0 MS 0 KB 196 2024-05-18 17:03:46

Tests(0/0):


Code:

# include<stdio.h> # include<iostream> using namespace std; int main(){ char x[201]; char a,b; int i=0; while(x[i]!='\0'){ if(s[i]==a) s[i]=b; i++; } cout<<x; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:8: error: 's' was not declared in this scope
     if(s[i]==a)
        ^