First accept input of two items : the count and a string. Then write a loop that outputs the string in every iteration.
This function can accept input :
cplusplus.com : sscanf/[
^] and
This function can output the string :
cplusplus.com : printf[
^].
You need to write the code yourself. Both of those reference pages have sample code that can help.