Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _07._Greeting
- {
- class Greeting
- {
- static void Main(string[] args)
- {
- //Write a program that enters first name, last name and age and prints "Hello, <first name> <last name>. You are <age>
- //years old.". Use interpolated strings.
- string firstName = Console.ReadLine();
- string secondName = Console.ReadLine();
- int age = int.Parse(Console.ReadLine());
- Console.WriteLine($"Hello, {firstName} {secondName}. You are {age} years old.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment