TheBulgarianWolf

Repeat Strings

Mar 17th, 2021
499
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace RepeatStrings
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string[] stringArr = { "Dog", "Cat", "Mouse" };
  10.             string line = "";
  11.             foreach(string word in stringArr)
  12.             {
  13.                 for(int i = 0; i < word.Length; i++)
  14.                 {
  15.                     line += word;
  16.                 }
  17.             }
  18.             Console.WriteLine(line);
  19.         }
  20.     }
  21. }
  22.  
RAW Paste Data