Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Got18
- {
- internal static class Program
- {
- public static void Main()
- {
- Console.Write("Введите ваш возраст: ");
- if (int.TryParse(Console.ReadLine(), out var age))
- Console.WriteLine(age >= 18 ? "Я работаю." : "Я отказываюсь работать!");
- else
- Console.WriteLine("Вы ввели некорректные данные!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement