fork(4) download
  1. using System;
  2.  
  3. namespace ConsoleApplication6
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int A, B, C = 0;
  10. int X, Y, Z = 0;
  11. Console.WriteLine("Введите размеры коробки");
  12. //Console.WriteLine("X: ");
  13. X = Convert.ToInt32(Console.ReadLine());
  14. //Console.WriteLine("Y: ");
  15. Y = Convert.ToInt32(Console.ReadLine());
  16. //Console.WriteLine("Z: ");
  17. Z = Convert.ToInt32(Console.ReadLine());
  18.  
  19. Console.WriteLine("Введите размеры вещи");
  20. //Console.WriteLine("А: ");
  21. A = Convert.ToInt32(Console.ReadLine());
  22. //Console.WriteLine("В: ");
  23. B = Convert.ToInt32(Console.ReadLine());
  24. //Console.WriteLine("С: ");
  25. C = Convert.ToInt32(Console.ReadLine());
  26. if (A > 0 && B > 0 && C > 0)
  27. {
  28. if ((A <= X && A <= Y && A <= Z) && (B <= X && B <= Y && B <= Z) && (C <= X && C <= Y && C <= Z))
  29. { Console.WriteLine("Поместится"); }
  30. else Console.WriteLine("не поместится");
  31. }
  32. else { Console.WriteLine("Недопустимый размер вещи"); }
  33. Console.ReadKey();
  34. }
  35. }
  36. }
Success #stdin #stdout 0.04s 24240KB
stdin
1
2
10
2
1
10
stdout
Введите размеры коробки
Введите размеры вещи
не поместится