Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
146388 杜禹轩 字符替换 C++ Compile Error 0 MS 0 KB 315 2026-01-28 13:29:09

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char a[201]={},z,x; cin>>a>>z>>x; while() for(int i=0;a[i]!='\0';i++){ if(a[i]==z){ a[i]=x; } } cout<<a; return 0; } /**7777788888 cout<<a<<endl; 7 8 8 7 88888 7 8 8 7 88888 cin.getline(a,100000);**/


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:8: error: expected primary-expression before ')' token
  while()
        ^