RedFlys

HomeWork C#Light2.1 цикл фразы

Jul 10th, 2020
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp14
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int userQuantity;
  10.             string userString;
  11.  
  12.             Console.WriteLine("Введите сообщение: ");
  13.             userString = Console.ReadLine();
  14.  
  15.             Console.WriteLine("Введите кол-во раз для повтора сообщения: ");
  16.             userQuantity = Convert.ToInt32(Console.ReadLine());
  17.  
  18.             for (int i = 0; i < userQuantity; i++)
  19.             {
  20.                 Console.WriteLine(userString);
  21.             }
  22.  
  23.             Console.ReadKey();
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment