|
@@ -0,0 +1,116 @@
|
|
|
+/// Задание 1
|
|
|
+
|
|
|
+Console.WriteLine("Задание ``Мышка``");
|
|
|
+Console.Write("Введите ширину, высоту ковра и радиус >>> ");
|
|
|
+
|
|
|
+var inp = Console.ReadLine();
|
|
|
+var inp_list = inp.Split(' ');
|
|
|
+int a = Convert.ToInt32(inp_list[0]);
|
|
|
+int b = Convert.ToInt32(inp_list[1]);
|
|
|
+int c = Convert.ToInt32(inp_list[2]);
|
|
|
+
|
|
|
+if (a >= c & b < c)
|
|
|
+{
|
|
|
+ Console.WriteLine("YES");
|
|
|
+}
|
|
|
+else if (a < c || b < c)
|
|
|
+{
|
|
|
+ Console.WriteLine("NO");
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/// Задание 2
|
|
|
+
|
|
|
+Console.WriteLine("Задание ``A+B``");
|
|
|
+Console.Write("Введите два целых числа >>> ");
|
|
|
+
|
|
|
+var Inp = Console.ReadLine();
|
|
|
+var num1 = Inp.Split()[0];
|
|
|
+var num2 = Inp.Split()[1];
|
|
|
+int plus = int.Parse(num1);
|
|
|
+int plus2 = int.Parse(num2);
|
|
|
+double res = Math.Pow(10, 9);
|
|
|
+
|
|
|
+if (plus+plus2 <= res)
|
|
|
+{
|
|
|
+ Console.WriteLine(plus + plus2);
|
|
|
+}
|
|
|
+else
|
|
|
+{
|
|
|
+ Console.WriteLine("Ошибка");
|
|
|
+}
|
|
|
+
|
|
|
+/// Задание 3
|
|
|
+
|
|
|
+Console.WriteLine("Задание ``Больше-Меньше``");
|
|
|
+Console.Write("Введите целые числа >>> ");
|
|
|
+
|
|
|
+var ab = Console.ReadLine();
|
|
|
+int ac = int.Parse(ab.Split()[0]);
|
|
|
+int ad = int.Parse(ab.Split()[1]);
|
|
|
+double numd = 2 * Math.Pow(10, 9);
|
|
|
+if (ac <= numd & ad <= numd)
|
|
|
+{
|
|
|
+ if (ac < ad)
|
|
|
+ {
|
|
|
+ Console.WriteLine("<");
|
|
|
+ }
|
|
|
+ else if (ac == ad)
|
|
|
+ {
|
|
|
+ Console.WriteLine("=");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Console.WriteLine(">");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/// Задание 4
|
|
|
+
|
|
|
+Console.WriteLine("Задание ``Ремонт``");
|
|
|
+Console.Write("Введите длину, ширину и высоту офиса >>> ");
|
|
|
+var zn = Console.ReadLine();
|
|
|
+int L = int.Parse(zn.Split()[0]);
|
|
|
+int W = int.Parse(zn.Split()[1]);
|
|
|
+int H = int.Parse(zn.Split()[2]);
|
|
|
+int P = 2*(L*H)+2*(W*H);
|
|
|
+if (P / 16 <= 0)
|
|
|
+{
|
|
|
+ Console.WriteLine(1);
|
|
|
+}
|
|
|
+else
|
|
|
+{
|
|
|
+ Console.WriteLine(P/16);
|
|
|
+}
|
|
|
+
|
|
|
+/// Задание 5
|
|
|
+
|
|
|
+Console.WriteLine("Задание ``Три толстяка``");
|
|
|
+Console.Write("Введите вес всех трех жиробасов >>> ");
|
|
|
+var zhir_res = Console.ReadLine();
|
|
|
+int zhirobas1 = int.Parse(zhir_res.Split()[0]);
|
|
|
+int zhirobas2 = int.Parse(zhir_res.Split()[1]);
|
|
|
+int zhirobas3 = int.Parse(zhir_res.Split()[2]);
|
|
|
+if (zhirobas1 > 757 || zhirobas2 > 757 || zhirobas3 > 757)
|
|
|
+{
|
|
|
+ Console.WriteLine("Error");
|
|
|
+}
|
|
|
+else if (zhirobas1 < 94 || zhirobas2 < 94 || zhirobas3 < 94)
|
|
|
+{
|
|
|
+ Console.WriteLine("Error");
|
|
|
+}
|
|
|
+else
|
|
|
+{
|
|
|
+ if (zhirobas1 > zhirobas2 & zhirobas1 > zhirobas3)
|
|
|
+ {
|
|
|
+ Console.WriteLine(zhirobas1);
|
|
|
+ }
|
|
|
+ if (zhirobas2 > zhirobas1 & zhirobas2 > zhirobas3)
|
|
|
+ {
|
|
|
+ Console.WriteLine(zhirobas2);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Console.WriteLine(zhirobas3);
|
|
|
+ }
|
|
|
+}
|