Advertisement
VodVas

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

Aug 16th, 2023 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | Software | 0 0
  1. Console.WriteLine("Введите сообщение, которое будет повторяться:");
  2. string repeatMassage = Console.ReadLine();
  3.  
  4. Console.WriteLine("Введите количество повторений:");
  5. int repeatCounter = Convert.ToInt32(Console.ReadLine());
  6.  
  7. for (int i = 0; i < repeatCounter; i++)
  8. {
  9.     Console.WriteLine(repeatMassage);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement