Teo_Yanchev

TextProcessing - 02. RepeatString - C# Fundamentals

Oct 24th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. using System;
  2. using System.Text;
  3.  
  4. namespace _02._RepeatString
  5. {
  6. class RepeatString
  7. {
  8. static void Main()
  9. {
  10. string[] words = Console.ReadLine()
  11. .Split();
  12. StringBuilder printMe = new StringBuilder();
  13.  
  14. for (int i = 0; i < words.Length; i++)
  15. {
  16. for (int k = 0; k < words[i].Length; k++)
  17. {
  18. printMe.Append(words[i]);
  19. }
  20. }
  21.  
  22. Console.WriteLine(printMe.ToString());
  23. }
  24. }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment