Skip to content

Instantly share code, notes, and snippets.

@smah-beep
Last active May 27, 2026 17:23
Show Gist options
  • Select an option

  • Save smah-beep/1e5defb1279301cf8e8a26c66fce5691 to your computer and use it in GitHub Desktop.

Select an option

Save smah-beep/1e5defb1279301cf8e8a26c66fce5691 to your computer and use it in GitHub Desktop.
ДЗ: Освоение циклов
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _DZ_
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Добро пожаловать! Эта программа выведет написанный вами текст столько раз, сколько вы захотите!");
Console.WriteLine("Напишите текст, который вы бы хотели повторить: ");
string userText = Console.ReadLine();
Console.Write("Укажите, сколько раз вы хотите повторить текст: ");
int countRepeat = Convert.ToInt32(Console.ReadLine());
for (int i = 0; countRepeat > i; i++)
{
Console.WriteLine(userText);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment