Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- public static void Main(string[] args)
- {
- string repeat = Console.ReadLine();
- int n = int.Parse(Console.ReadLine());
- string result = RepeatString(repeat, n);
- Console.WriteLine(result);
- }
- public static string RepeatString(string word,int count)
- {
- string str = word;
- for (int i = 1; i < count; i++)
- {
- str += word;
- }
- return str;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement