Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 547 Bytes

repeat a word read from the user input.md

File metadata and controls

28 lines (17 loc) · 547 Bytes

Activity: repeat a word read from the user input

Activity: repetition of strings

statement

Write a C-program that prints out a word as many times as specified. The number of repetitions and the word should be given as input to the program. You may assume that the word has no more than 100 characters (be sure to also reserve space for the null terminator, \0, though!).

Examples

Input:

2 Hello

Output:

Hello  
Hello

Input:

4 thing

Output:

thing  
thing  
thing  
thing