Advertisement
tsvetelinapasheva

TsvetelinaPasheva/FirstStepInCodingLab/06.ConcatenateData

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