0

Hey everyone, I am writing a program that needs to take 10 integers and display them, then it needs to sort them in order from lowest to highest and then display them again. I was trying to use selection sort to sort them, but I think I set it up wrong. My code compiles and runs fine until it prints the numbers. Alls it prints is a bunch of zeros, I am not really sure what is wrong with it. Any help is greatly appreciated, thanks in advance.

```
import TerminalIO.KeyboardReader;
public class sort
{
public static void main(String[] args)
{
KeyboardReader reader = new KeyboardReader();
int[] num = new int[10];
int numb;
int t;
int u;
int min;
int temp = 0;
System.out.print("Enter your numbers: ");
for(int g = 0; g < 10; g++)
{
numb = reader.readInt();
numb = num[g];
}
for(int y = 0; y < 10; y++)
{
System.out.println("The numbers you entered are" +num[y]);
}
for (int i = 0; i < 10; i++)
{
min = i;
for(int a = 0; a < 10; a++)
{
if(num[i] < num[min]);
{
if (min != i)
{
num[i] = num[min];
num[min] = temp;
}
}
}
}
for(int h = 0; h < 10; h++)
{
System.out.print(num[h]);
}
}
}
```