C++:
#include <iostream>
#include <string>
int main() {
std::string out = "", in;
std::cin >> in;
for (int i = 0; i < in.lenght(); i++){
if (in[i] == '7') {
out += "77";
} else {
out += in[i];
}
std::cout << out << std::endl;
return 0;
C++:
#include <iostream>
#include <string>
int main() {
std::string out = "", in;
std::cin >> in;
for (int i = 0; i < in.lenght(); i++){
if (in[i] == '7') {
out += "77";
} else {
out += in[i];
}
}
std::cout << out << std::endl;
return 0;
}