if (val1.charAt(0) == 'A' || val1.charAt(0) == 'a')
{
System.out.println("Numbers in Ascending Order:");
for (int asc : numx)
{
System.out.print (asc + " ");
}
}
if (val1.charAt(0) == 'D' || val1.charAt(0) == 'd')
{
System.out.println("Numbers in Descending Order:");
for (int desc : numx)
{
System.out.print (desc + " ");
}
}
}
}
}
Hello im almost finish with this code..
I would like to know how do you sort numbers in Ascending and Descending .. the one in asc/desc?