Last active
April 2, 2025 14:18
-
-
Save Strelok78/cb6cb389879b11666decd47fee6dd44d to your computer and use it in GitHub Desktop.
Вывод сообщения пользователя кол-во раз заданное пользователем
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace iJuniorPractice; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string userMessage; | |
string messageRequestText = "Введите сообщение: "; | |
string messageRepeatCountRequestText = "Введите кол-во повторений сообщения: "; | |
int messageRepeatCount; | |
Console.Write(messageRequestText); | |
userMessage = Console.ReadLine(); | |
Console.Write(messageRepeatCountRequestText); | |
messageRepeatCount = int.Parse(Console.ReadLine()); | |
for (int i = 0; i < messageRepeatCount; i++) | |
{ | |
Console.WriteLine(userMessage); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment