desislava_topuzakova

3. Поздрав по име

Nov 14th, 2021
919
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _03._Greeting_By_Name
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //1. прочитам името на човек
  10.             //2. отпечатвам: “Hello, <name>!”
  11.             string name = Console.ReadLine();
  12.             //начин 1: Console.WriteLine("Hello, " + name + "!");
  13.             //начин 2:
  14.             Console.WriteLine($"Hello, {name}!");
  15.         }
  16.     }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment