Created
February 8, 2025 16:35
-
-
Save MelnichenkoAleks/830fce1f47d3950d1e8c72f80171e95e 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.Globalization; | |
namespace FirstModule | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.Write("Введите длинну помещения в метрах: "); | |
float length = float.Parse(Console.ReadLine(), CultureInfo.InvariantCulture); | |
Console.Write("Введите ширину помещения в метрах: "); | |
float width = float.Parse(Console.ReadLine(), CultureInfo.InvariantCulture); | |
float areaRoom = length * width; | |
Console.WriteLine($"Площадь помещения составляет в метрах квадратных: {areaRoom}"); | |
Console.Write("Введите площадь коробки в метрах квадратных: "); | |
float areaBox = float.Parse(Console.ReadLine()); | |
int maxBoxes = (int)(areaRoom / areaBox); | |
Console.WriteLine($"Максимальное количество коробок, которое можно поставить в помещении: {maxBoxes}"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment