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 timePerPatient = 10; | |
| int minutesInHour = 60; | |
| Console.Write("Введите кол-во пациентов в очереди: "); | |
| int patientsCount = Convert.ToInt32(Console.ReadLine()); | |
| int totalMinutes = patientsCount * timePerPatient; | |
| int hours = totalMinutes / minutesInHour; | |
| int minutes = totalMinutes % 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
| int crystalPrice = 8; | |
| Console.WriteLine("Добро пожаловать в магазин кристаллов!"); | |
| Console.Write("Сколько золота у вас в кошельке? "); | |
| int gold = Convert.ToInt32(Console.ReadLine()); | |
| Console.Write($"Сколько кристаллов хотите купить? (Цена: {crystalPrice} золота за 1 шт) "); | |
| int crystalsToBuy = Convert.ToInt32(Console.ReadLine()); |
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 cup1 = "Кофе"; | |
| string cup2 = "Чай"; | |
| Console.WriteLine("До перестановки:"); | |
| Console.WriteLine("Чашка 1: " + cup1); | |
| Console.WriteLine("Чашка 2: " + cup2); | |
| Console.WriteLine("\n--- Меняем местами ---"); | |
| string temp = cup1; |
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 firstName = "Иванов"; | |
| string lastName = "Пётр"; | |
| Console.WriteLine("До перестановки:"); | |
| Console.WriteLine("Имя: " + firstName); | |
| Console.WriteLine("Фамилия: " + lastName); | |
| Console.WriteLine("\n--- Меняем местами ---"); | |
| string temp = firstName; |
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 totalPictures = 52; | |
| int picturesPerRow = 3; | |
| int fullRows = totalPictures / picturesPerRow; | |
| int extraPictures = totalPictures % picturesPerRow; | |
| Console.WriteLine("Полностью заполненных рядов: " + fullRows); | |
| Console.WriteLine("Картинок сверх меры: " + extraPictures); |
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.Write("Как вас зовут: "); | |
| string name = Console.ReadLine(); | |
| Console.Write("Сколько вам лет: "); | |
| string age = Console.ReadLine(); | |
| Console.Write("Какой ваш знак зодиака: "); | |
| string zodiac = 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 age = 30; | |
| int weight = 80; | |
| float height = 1.75f; | |
| string firstName = "John"; | |
| string lastName = "Doe"; | |
| string nickname = "JD"; | |
| bool isAdult = age >= 18; | |
| double bmi = weight / (height * height); | |
| double idealWeight = 22.5 * (height * height); | |
| float averageWeight = (float)(weight + idealWeight) / 2; |