Advertisement
Rodunskiy

Untitled

May 5th, 2024
738
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CSLight
  4. {
  5.     public class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string text;
  10.             int numberRepetitions;
  11.  
  12.             Console.WriteLine("Введите текст:");
  13.             text = Console.ReadLine();
  14.  
  15.             Console.WriteLine("Введите кол-во повторений:");
  16.             numberRepetitions = Convert.ToInt32(Console.ReadLine());
  17.             Console.Clear();
  18.  
  19.             for (int i = 0; i < numberRepetitions; i++)
  20.             {
  21.                 Console.WriteLine(text);
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement