fork download
  1. using UnityEngine;
  2.  
  3. public class NewBehaviourScript : MonoBehaviour
  4. {
  5. // Start is called before the first frame update
  6. void Start()
  7. {
  8. int point = 300;
  9. int[] num = new int[10];
  10. for (int i = 0; i < 10; i++)
  11. {
  12. if (i == 9)
  13. num[i] = point;
  14. else if (point == 0)
  15. num[i] = 0;
  16. else
  17. {
  18. int tmpPoint = Random.Range(0, 61);
  19. if (tmpPoint < point)
  20. {
  21. num[i] = tmpPoint;
  22. point -= tmpPoint;
  23. }
  24. else
  25. {
  26. num[i] = tmpPoint;
  27. point = 0;
  28. }
  29. }
  30. }
  31.  
  32. for (int i = 0; i < num.Length; i++)
  33. {
  34. Debug.Log("パラメータ " + i + " = " + num[i]);
  35. }
  36. }
  37. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,7): error CS0246: The type or namespace name `UnityEngine' could not be found. Are you missing an assembly reference?
prog.cs(3,35): error CS0246: The type or namespace name `MonoBehaviour' could not be found. Are you missing an assembly reference?
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty