Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RepeatString
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- int num = int.Parse(Console.ReadLine());
- RepeatString(input, num);
- }
- static string RepeatString(string input, int num)
- {
- string output = string.Empty;
- for (int i = 0; i < num; i++)
- {
- output += input;
- }
- Console.WriteLine(output);
- return(output);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement