Advertisement
TeT91

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

May 7th, 2024 (edited)
597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CSLight
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("Введите ваше сообщение");
  10.             string userMessage = Console.ReadLine();
  11.             Console.WriteLine("Сколько раз его вывести?");
  12.             int repeatCount = Convert.ToInt32(Console.ReadLine());
  13.  
  14.             for (int i = 0; i < repeatCount; i++)
  15.             {
  16.                 Console.WriteLine(userMessage);
  17.             }
  18.  
  19.             Console.ReadLine();
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement