Last active
April 12, 2020 09:04
-
-
Save DreamerDeLy/158242887d351d8371c1bb0acfdcca99 to your computer and use it in GitHub Desktop.
Task 13 [C#]
This file contains 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
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(); | |
} | |
} | |
} |
This file contains 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
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