SaNik74

WorkWithString

Jan 17th, 2024
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. class Program
  2. {
  3.     static void Main(string[] args)
  4.     {
  5.         int age;
  6.         string name;
  7.         string zodiacSign;
  8.         string profession;
  9.  
  10.         Console.WriteLine("Как вас зовут?");
  11.         name = Console.ReadLine();
  12.         Console.Clear();
  13.  
  14.         Console.WriteLine("Сколько вам лет?");
  15.         age = Convert.ToInt32(Console.ReadLine());
  16.         Console.Clear();
  17.  
  18.         Console.WriteLine("Какой у вас знак зодиака?");
  19.         zodiacSign = Console.ReadLine();
  20.         Console.Clear();
  21.  
  22.         Console.WriteLine("Кем вы работаете?");
  23.         profession = Console.ReadLine();
  24.         Console.Clear();
  25.  
  26.         Console.WriteLine($"Вас зовут {name}, вам {age} лет, знак зодиака {zodiacSign}, профессия {profession}");
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment