From 3625a51a84d4677980d810acec08428eabd80229 Mon Sep 17 00:00:00 2001 From: Daitbro Date: Sun, 22 Mar 2026 00:58:52 +0300 Subject: [PATCH] Add Greet function --- Greeter.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Greeter.cs diff --git a/Greeter.cs b/Greeter.cs new file mode 100644 index 0000000..c8e3ad8 --- /dev/null +++ b/Greeter.cs @@ -0,0 +1,11 @@ +public class Greeter +{ + public static string Greet(string name) + { + if (string.IsNullOrWhiteSpace(name)) + { + return "Привет, незнакомец!"; + } + return $"Привет, {name}!"; + } +}