Advertisement
maus234

Untitled

Aug 26th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Leson01
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             string userMessages;
  15.             int numberOfRepetitions;
  16.  
  17.             Console.Write("Здраствуйте! видите сообщения коротие хотите для повторения:");
  18.             userMessages = Console.ReadLine();
  19.             Console.Write("Сколько вы хотите что бы сообщения повторилось:");
  20.             numberOfRepetitions = Convert.ToInt32(Console.ReadLine());
  21.             while (numberOfRepetitions-- > 0 )
  22.             {
  23.                 Console.WriteLine(userMessages);
  24.             }
  25.  
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement