W1thr

Домашка №7

Jan 9th, 2021 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Homework7
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int repeats;
  10.             string message;
  11.  
  12.             Console.Write("Укажите сообщение, которое вы хотите вывести:");
  13.             message = Console.ReadLine();
  14.  
  15.             Console.Write("Сколько раз вы хотите eго вывести:");
  16.             repeats = Convert.ToInt32(Console.ReadLine());
  17.  
  18.             while (repeats-- > 0)
  19.             {
  20.                 Console.WriteLine(message);
  21.             }
  22.         }
  23.     }
  24. }
  25.  
Add Comment
Please, Sign In to add comment