Skip to content

Instantly share code, notes, and snippets.

@ShamilAitov
Last active February 2, 2023 08:08
Show Gist options
  • Save ShamilAitov/62533a2be6c84fe61f2a24b9b0f0ae1d to your computer and use it in GitHub Desktop.
Save ShamilAitov/62533a2be6c84fe61f2a24b9b0f0ae1d to your computer and use it in GitHub Desktop.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace УрокApp2
{
internal class Program
{
static void Main(string[] args)
{
string text;
int outputQuantity;
Console.Write("Введите текст, который должен выводится на экране: ");
text = Console.ReadLine();
Console.Write("Введите, сколько раз этот текст должен выводится на экране: ");
outputQuantity = Convert.ToInt32(Console.ReadLine());
if (outputQuantity > 0)
{
for (int repetition = 0; repetition < outputQuantity; repetition++)
{
Console.WriteLine(text);
}
}
else
{
Console.WriteLine("Ну как хочешь");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment