Advertisement
junniorrkaa

Освоение циклов

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