Skip to content

Instantly share code, notes, and snippets.

@DreamerDeLy
Last active April 12, 2020 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DreamerDeLy/158242887d351d8371c1bb0acfdcca99 to your computer and use it in GitHub Desktop.
Save DreamerDeLy/158242887d351d8371c1bb0acfdcca99 to your computer and use it in GitHub Desktop.
Task 13 [C#]
using System;
namespace Task13
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Введiть строку");
string str = Console.ReadLine();
if (str.Contains("13"))
{
str = str.Replace("13", "14");
Console.WriteLine("Результат:");
Console.WriteLine(str);
}
else
{
Console.WriteLine("ERROR: строка не містить чисел 13");
}
Console.ReadKey();
}
}
}
C:\AP\Task13>dotnet run
Введiть строку
13 числа 13 тижня року в 13 будинку на вулиці 13
Результат:
14 числа 14 тижня року в 14 будинку на вулиц? 14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment