Last active
May 16, 2023 15:50
-
-
Save Strelok78/b5187d1fdffc36279e5065fc4f9a62e0 to your computer and use it in GitHub Desktop.
Displays the message specified by the user a specified number of times.
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 MyCode | |
| { | |
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| int repeats; | |
| string repeatedText; | |
| Console.WriteLine("Enter text needed to be repeated: "); | |
| repeatedText = Console.ReadLine(); | |
| Console.WriteLine("Amount of repeats: "); | |
| repeats = int.Parse(Console.ReadLine()); | |
| for (int i = 0; i < repeats; i++) | |
| { | |
| Console.WriteLine(repeatedText); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment