using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Text1 : MonoBehaviour {
public Text num;
int[] intArray = new int[] { 1, 4, 3, 2, 5 };
string b;
// Use this for initialization
void Start () {
for (int j = 0; j < intArray.Length - 1; j++)
{
for (int i = 0; i < intArray.Length - 1; i++)
{
if (intArray[i + 1] < intArray[i])
{
int s = intArray[i];
intArray[i] = intArray[i + 1];
intArray[i + 1] = s;
}
}
}
for (int i = 0; i < intArray.Length; i++)
{
Debug.Log(intArray[i] + " ");
}
for (int k = 0; k < intArray.Length; k++)
{
int a = intArray[k];
b += a.ToString();
}
num.text = b;
}
// Update is called once per frame
void Update () {
}
}