Advertisement
YavorGrancharov

Tricky_Strings_[80%]

Jun 17th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Tricky_Strings
  4. {
  5.     public class TrickyStrings
  6.     {
  7.         public static void Main()
  8.         {
  9.             string delimiter = Console.ReadLine();
  10.  
  11.             int n = int.Parse(Console.ReadLine());
  12.  
  13.             string result = string.Empty;
  14.  
  15.             for (int i = 0; i < n; i++)
  16.             {
  17.                 string words = Console.ReadLine();
  18.                 result += words + delimiter;
  19.             }
  20.             result = result.Remove(result.Length - delimiter.Length);
  21.             Console.WriteLine(result);
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement