Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CSLightFirst
- {
- class Program
- {
- private static void Main()
- {
- string message;
- int count;
- while (true)
- {
- Console.Write("Введите сообщение, которое хотите повторить: ");
- message = Console.ReadLine();
- Console.Write("Сколько раз вы хотите его повторить? ");
- if (int.TryParse(Console.ReadLine(), out count))
- {
- Console.WriteLine();
- for (int i = 0; i < count; i++)
- Console.WriteLine(message);
- Console.WriteLine();
- }
- else
- {
- Console.Clear();
- Console.WriteLine("Введено некорректное число! Попробуйте ещё раз...\n");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement