Skip to content

Instantly share code, notes, and snippets.

@tsk-arh
Last active January 5, 2024 10:20
Show Gist options
  • Save tsk-arh/419a8bae5dcc97b714ae53cbf6c29dbf to your computer and use it in GitHub Desktop.
Save tsk-arh/419a8bae5dcc97b714ae53cbf6c29dbf 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 ConsoleApp4
{
internal class Program
{
static void Main(string[] args)
{
int repeatOnce;
string message;
Console.WriteLine($"Какое сообщение вы желаете повторять?");
message = Console.ReadLine();
Console.WriteLine($"Сколько раз повторить сообщение?");
repeatOnce = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < repeatOnce; i++)
{
Console.WriteLine(message);
}
Console.ReadLine();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment