Skip to content

Instantly share code, notes, and snippets.

@IvanEnginer
Created August 10, 2024 13:33
Show Gist options
  • Save IvanEnginer/954effb27db27ce8c4389ebb6d166210 to your computer and use it in GitHub Desktop.
Save IvanEnginer/954effb27db27ce8c4389ebb6d166210 to your computer and use it in GitHub Desktop.
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