Advertisement
sergezhu

Untitled

Apr 5th, 2023
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. namespace ConsoleApp1;
  2.  
  3. using System.Text;
  4.  
  5. public class Task08
  6. {
  7.     public void Run()
  8.     {
  9.         Console.InputEncoding = Encoding.Unicode;
  10.         Console.OutputEncoding = Encoding.Unicode;
  11.  
  12.         Console.Write( "Input text that repeating : " );
  13.         string repeatingText = Console.ReadLine();
  14.        
  15.         Console.Write( "Input repeats count : " );
  16.         int repeatsCount = int.Parse(Console.ReadLine());
  17.  
  18.         Console.WriteLine( "Output : " );
  19.  
  20.         for ( int i = 0; i < repeatsCount; i++ )
  21.         {
  22.             Console.WriteLine( $"{i} : {repeatingText}" );
  23.         }
  24.     }
  25. }
  26.  
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement