This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
NG_2023_Stanislav_Mykhailenko/Lesson_1/Task_2/Program.cs
Stanislav Mykhailenko 7750918837
Minor fixes
2023-03-06 14:22:05 +02:00

18 lines
305 B
C#

/*
* Lesson 1 Task 2: get a number and add 10 to it
* Author: Stanislav Mykhailenko
* License: Unlicense
*/
int number;
Console.Write("Enter a number: ");
if (int.TryParse(Console.ReadLine(), out number))
{
Console.WriteLine(number + 10);
}
else
{
Console.WriteLine("Invalid data entered.");
}