Created
January 8, 2024 16:10
-
-
Save QRemark/fccc9614352b8831d13712fbc28fe0bc to your computer and use it in GitHub Desktop.
Работа со строками
This file contains 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.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