Created
May 23, 2026 18:32
-
-
Save smah-beep/70daa5e997ed179fea7e2463f49a6c1d to your computer and use it in GitHub Desktop.
ДЗ: Работа со строками
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace _DZ_ | |
| { | |
| internal class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string name; | |
| string month; | |
| int age; | |
| int dateMonth; | |
| int yearBirth; | |
| string fruit; | |
| string vegetable; | |
| string season; | |
| Console.Write("Назовите ваше имя: "); | |
| name = Console.ReadLine(); | |
| Console.Write("Введите ваш возраст: "); | |
| age = Convert.ToInt32(Console.ReadLine()); | |
| Console.Write("Введите год вашего рождения: "); | |
| yearBirth = Convert.ToInt32(Console.ReadLine()); | |
| Console.Write("Введите месяц вашего рождения (в формате 01, 02, ..., 12): "); | |
| month = Console.ReadLine(); | |
| Console.Write("Назовите день вашего рождения: "); | |
| dateMonth = Convert.ToInt32(Console.ReadLine()); | |
| Console.Write("Назовите ваш любимый фрукт: "); | |
| fruit = Console.ReadLine(); | |
| Console.Write("Назовите ваш любимый овощ: "); | |
| vegetable = Console.ReadLine(); | |
| Console.Write("Назовите ваше любимое время года: "); | |
| season = Console.ReadLine(); | |
| Console.WriteLine("Вот некоторая информация о вас: "); | |
| Console.WriteLine($"Вас зовут {name}, сейчас вам {age}, вы родились {dateMonth}.{month}.{yearBirth}."); | |
| Console.WriteLine($"Вы любите {fruit} и {vegetable}, ваше любимое время года {season}"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment