Advertisement
Spocoman

02. Repeat Strings

Apr 12th, 2023
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. namespace RepeatStrings
  6. {
  7.  
  8.     class Program
  9.     {
  10.         static void Main()
  11.         {
  12.             string[] words = Console.ReadLine().Split(" ");
  13.  
  14.             for (int i = 0; i < words.Length; i++)
  15.             {
  16.                 Console.Write(String.Concat(Enumerable.Repeat(words[i], words[i].Length)));
  17.             }
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement