Added project
This commit is contained in:
40
HW02 - Base programming/Assets/Scripts/Hw2P2.cs
Normal file
40
HW02 - Base programming/Assets/Scripts/Hw2P2.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
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("Яблоки");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user