Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace Methods
- {
- public class Methods
- {
- public static void Main()
- {
- string word = Console.ReadLine().ToLower();
- int repeat = int.Parse(Console.ReadLine());
- Console.WriteLine(Repeat(word, repeat));
- }
- public static string Repeat(string word, int repeat)
- {
- string result = "";
- for (int i = 0; i < repeat; i++)
- {
- result += word;
- }
- return result;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement