desislava_topuzakova

4. Съединяване на текст и числа

Nov 14th, 2021
915
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _04._Concatenate_Data
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //1. име, фамилия, възраст, град
  10.             //2. отпечатвам “You are <firstName> <lastName>, a <age>-years old person from <town>.”
  11.             string name = Console.ReadLine(); //1 ред
  12.             string lastName = Console.ReadLine(); //2 ред
  13.             int age = int.Parse(Console.ReadLine()); //3 ред
  14.             string town = Console.ReadLine(); //4 ред
  15.             Console.WriteLine($"You are {name} {lastName}, a {age}-years old person from {town}.");
  16.         }
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment