Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConcatenateData
- {
- class Program
- {
- static void Main(string[] args)
- {
- string firstName = Console.ReadLine();
- string lastName = Console.ReadLine();
- int age = int.Parse(Console.ReadLine());
- string town = Console.ReadLine();
- Console.WriteLine("You are " + firstName + ' ' + lastName + ", a " + age + "-years old person from " + town + '.');
- }
- }
- }
- ИЛИ:
- namespace ConcatenateData
- {
- class Program
- {
- static void Main(string[] args)
- {
- string firstName = Console.ReadLine();
- string lastName = Console.ReadLine();
- int age = int.Parse(Console.ReadLine());
- string town = Console.ReadLine();
- Console.WriteLine($"You are {firstName} {lastName}, a {age}-years old person from {town}.");
- }
- }
- }
- ИЛИ:
- namespace ConcatenateData
- {
- class Program
- {
- static void Main(string[] args)
- {
- string firstName = Console.ReadLine();
- string lastName = Console.ReadLine();
- int age = int.Parse(Console.ReadLine());
- string town = Console.ReadLine();
- Console.WriteLine("You are {0} {1}, a {2}-years old person from {3}.", firstName, lastName, age, town);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement