#include<iostream> int main() { std::string s="HAI HOW ARE YOU !"; int pos=s.find(" "); while(pos != std::string::npos) { s.erase(pos,1); s.insert(pos,"20"); pos=s.find(" "); } std::cout<<s; return 0; }
No comments:
Post a Comment