Problem: String Repeater

Create a method RepeatString(str, count), which takes parameters of type string and an integer n and returns the string, repeated n times. After this print the result on the console.

Sample Input and Output

Input Output Input Output
str
2
strstr roki
6
rokirokirokirokirokiroki

Hints and Guidelines

Add to the method below the input string to the result that you will print:

Keep in mind that in C# concatenating strings in loops leads to bad productivity and is not recommended. Look for more effective solutions here: https://stackoverflow.com/questions/411752.

Testing in the Judge System

Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/594#9.

results matching ""

    No results matching ""