0
C++ Question
Write a function that takes an input string. As output, add and return letter by letter to string. example: input: Code output : CCoCodCode
1 Odpowiedź
0
std::string repeatString(std::string input){
std::string output;
for(int i = 0; i < input.length(); i++){
for(int j = 0; j <= i; j++){
output += input[j];
}
}
return output;
}