41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class Hw2P2 : MonoBehaviour {
|
|||
|
|
|
|||
|
|
public int apples = 3;
|
|||
|
|
public int oranges = 5;
|
|||
|
|
public int tomatoes = 2;
|
|||
|
|
|
|||
|
|
// Start is called before the first frame update
|
|||
|
|
void Start() {
|
|||
|
|
if (apples >= oranges) {
|
|||
|
|
if (oranges >= tomatoes) {
|
|||
|
|
Debug.Log("Яблоки");
|
|||
|
|
Debug.Log("Апельсины");
|
|||
|
|
Debug.Log("Помидоры");
|
|||
|
|
} else if (tomatoes >= apples) {
|
|||
|
|
Debug.Log("Помидоры");
|
|||
|
|
Debug.Log("Яблоки");
|
|||
|
|
Debug.Log("Апельсины");
|
|||
|
|
} else {
|
|||
|
|
Debug.Log("Яблоки");
|
|||
|
|
Debug.Log("Помидоры");
|
|||
|
|
Debug.Log("Апельсины");
|
|||
|
|
}
|
|||
|
|
} else if (tomatoes >= oranges) {
|
|||
|
|
Debug.Log("Помидоры");
|
|||
|
|
Debug.Log("Апельсины");
|
|||
|
|
Debug.Log("Яблоки");
|
|||
|
|
} else if (apples >= tomatoes) {
|
|||
|
|
Debug.Log("Апельсины");
|
|||
|
|
Debug.Log("Яблоки");
|
|||
|
|
Debug.Log("Помидоры");
|
|||
|
|
} else {
|
|||
|
|
Debug.Log("Апельсины");
|
|||
|
|
Debug.Log("Помидоры");
|
|||
|
|
Debug.Log("Яблоки");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|