C ++ program to concatenate a string given number of times | Function which return string by concatenating it . ; Copying given string to temporary string . ; Concatenating strings ; Driver code
def repeat ( s , n ) : NEW_LINE INDENT s1 = s NEW_LINE for i in range ( 1 , n ) : NEW_LINE INDENT s += s1 NEW_LINE DEDENT return s NEW_LINE DEDENT s = " geeks " NEW_LINE n = 3 NEW_LINE print ( repeat ( s , n ) ) NEW_LINE