Created
August 10, 2024 13:33
-
-
Save IvanEnginer/954effb27db27ce8c4389ebb6d166210 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; | |
namespace HW_1 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
int lenghtHome = 0; | |
int widthHome = 0; | |
int lenghtBox = 0; | |
int widthBox = 0; | |
int squareHome; | |
int squareBox; | |
int quantityBox; | |
Console.WriteLine("Введите длинну дома: "); | |
lenghtHome = int.Parse(Console.ReadLine()); | |
Console.WriteLine("Введите ширину дома: "); | |
widthHome = int.Parse(Console.ReadLine()); | |
Console.WriteLine("Введите длинну коробки: "); | |
lenghtBox = int.Parse(Console.ReadLine()); | |
Console.WriteLine("Введите ширину коробки: "); | |
widthBox = int.Parse(Console.ReadLine()); | |
squareHome = lenghtHome * widthHome; | |
squareBox = widthBox * widthBox; | |
quantityBox = squareHome / squareBox; | |
Console.WriteLine(quantityBox + " поместится в вашем доме"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment