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
| byte age | |
| short temperatureOutside | |
| ushort heightOfBuilding | |
| uint amountOfCoins | |
| int health | |
| double result | |
| float wheightOfCheese | |
| bool isAbleToMove | |
| string nameOfGuild | |
| char classOfItem |
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
| Console.InputEncoding = Encoding.Unicode; | |
| Console.OutputEncoding= Encoding.Unicode; | |
| Console.Write("как вас зовут?"); | |
| string name = Console.ReadLine(); | |
| Console.Write("Сколько вам лет?"); | |
| int age = Convert.ToInt32(Console.ReadLine()); | |
| Console.Write("Какой у вас знак зодиака?"); |
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
| int totalAmount = 52; | |
| int amountInRow = 3; | |
| int amountOfRows = totalAmount / amountInRow; | |
| int notInRows = totalAmount % amountInRow; | |
| Console.WriteLine($"Получаеться {amountOfRows} рядов, и остается {notInRows} картинок"); |
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
| string name = "Eremin"; | |
| string familyName = "Andrew"; | |
| Console.WriteLine($"Ваше имя: {name}, ваша фамилия {familyName}"); | |
| string change = name; | |
| name = familyName; | |
| familyName = change; |
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
| int money; | |
| int crystal; | |
| int crystalPrice = 10; | |
| Console.WriteLine($"Добро пожаловать в магазин кристалов. Кристалы сегодня по {crystalPrice} золота. Скольео у вас золота?" ); | |
| money = Convert.ToInt32(Console.ReadLine()); | |
| Console.WriteLine("Сколько кристалов вы хотите купить?"); | |
| crystal = Convert.ToInt32(Console.ReadLine()); | |
| money -= crystal * crystalPrice; |
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
| int timePerPerson = 10; | |
| int minutesInHour = 60; | |
| Console.WriteLine("Добро пожаловать в поликлинику! Сколько человек в лчереди?"); | |
| int personInLine = Convert.ToInt32(Console.ReadLine()); | |
| int timeInLine = timePerPerson * personInLine; | |
| int hoursInLine = timeInLine / minutesInHour; | |
| int minutesInLine = timeInLine % minutesInHour; |
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
| string phrase; | |
| int howManyTimes; | |
| Console.WriteLine("Какую фразу вы хотите написать"); | |
| phrase = Console.ReadLine(); | |
| Console.WriteLine("Сколько раз написать фразу?"); | |
| howManyTimes = Convert.ToInt32(Console.ReadLine()); | |
| while (howManyTimes > 0) |
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
| string password = "exit"; | |
| string word; | |
| Console.WriteLine("Введите слово"); | |
| word = Console.ReadLine(); | |
| bool check = (word == password); | |
| int checkbool = Convert.ToInt32(check); | |
| while (checkbool < 1) |
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
| string password = "exit"; | |
| string word; | |
| Console.WriteLine("Введите слово"); | |
| word = Console.ReadLine(); | |
| while (password != word) ; | |
| { |
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
| string password = "exit"; | |
| string word; | |
| Console.WriteLine("Введите слово"); | |
| word = Console.ReadLine(); | |
| if (word == password) | |
| { | |
| Console.WriteLine("Верно"); | |
| } |
OlderNewer