public class NewBehaviourScript : MonoBehaviour {
public int [] Array = {1,3,4,9,7,40,2,35,67,0};
void Start () {
for (int j=9; j>=0; j--)
{
Debug.Log(Array [j]);
}
}
void Update ()
{
}
}
用unity 编写程序,把由10个元素组成的一维数组逆序存放再输出。
最新推荐文章于 2023-04-21 22:05:03 发布