Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146383 刘梓含 字符替换 C++ Compile Error 0 MS 0 KB 198 2026-01-28 13:27:38

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main (){ cin >> a >> s >> d; for(int i = 0;a[i] != '\0';i++) { if(a[i] == s) { a[i] = d; } } cout << a; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:9: error: 'a' was not declared in this scope
  cin >> a >> s >> d;
         ^
Main.cc:6:14: error: 's' was not declared in this scope
  cin >> a >> s >> d;
              ^
Main.cc:6:19: error: 'd' was not declared in this scope
  cin >> a >> s >> d;
                   ^