Skip to content

Instantly share code, notes, and snippets.

@QRemark
Created January 8, 2024 16:10
Show Gist options
  • Save QRemark/fccc9614352b8831d13712fbc28fe0bc to your computer and use it in GitHub Desktop.
Save QRemark/fccc9614352b8831d13712fbc28fe0bc to your computer and use it in GitHub Desktop.
Работа со строками
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace homeWork1
{
internal class Program
{
static void Main(string[] args)
{
Console.InputEncoding = Encoding.Unicode;
Console.OutputEncoding = Encoding.Unicode;
string name;
int age;
string zodiac;
string job;
Console.WriteLine("Добрый день! Ответьте пожалуйста на 4 вопроса: ");
Console.Write("Скажите пожалуйста, как Вас зовут: ");
name = Console.ReadLine();
Console.Write("Скажите пожалуйста, сколько Вам полных лет (только цифры): ");
age = Convert.ToInt32(Console.ReadLine());
Console.Write("Скажите пожалуйста, какой у Вас знак зодиака: ");
zodiac = Console.ReadLine();
Console.Write("Скажите пожалуйста, где именно вы работаете: ");
job = Console.ReadLine();
Console.WriteLine("Большое спасибо! Небольшой текст о Вас ниже: ");
Console.WriteLine($"Вас зовут {name}, Вам {age} год/лет, Вы {zodiac} по " +
$"знаку зодиака и вы работаете {job}.");
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment