- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Введите имя гипопотама");
string Name = Console.ReadLine();
Console.WriteLine("Введите возраст гипопотама");
int a = Int32.Parse(Console.ReadLine());
Console.WriteLine("Введите размер ботинка гипопотама");
int b = Int32.Parse(Console.ReadLine());
Console.WriteLine("Введите число детей гипопотама");
int c = Int32.Parse(Console.ReadLine());
double answer = (Math.Pow(a,2) - 2*a*b + Math.Pow(b, 2)) + (2*b*c)*Math.Pow(2 * b * c,2);
Console.WriteLine($"Число волос на попе гипопотама {Name}a вычисляем по формуле :\n " +
"(a^2 - 2ab + b^2) - (2bc)^3 \n"+
$"({a}^2 - 2*{a}*{b} - {b}^2) + (2*{b}*{c})^3");
Console.WriteLine($"Ответ: {answer} волос на попе {Name}а");
}
}
Комментарии (0) RSS
Добавить комментарий