Last active
January 5, 2024 10:20
-
-
Save tsk-arh/419a8bae5dcc97b714ae53cbf6c29dbf to your computer and use it in GitHub Desktop.
ЗАДАНИЕ Освоение циклов
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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