desislava_topuzakova

06. Concatenate Data

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