Cls
input"no. Of elements",n
for i=1 to n
input,a(i)
next i
for i=1 to n-1
for j=i+1 to n
if a(i)>a(j) then swap a(i),a(j)
next j
next i
for i=1 to n
print, a(i)
next i
end
Sort the array then traverse the array, printing the element values as you go.
No. They can be sorted either ways. Ascending or Descending.
uitihyiuiphoiphuihyi
public class BubbleSortAscendingOrderDemo { public static void main(String a[]) { //Numbers which need to be sorted int numbers[] = {23,5,23,1,7,12,3,34,0}; //Displaying the numbers before sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i < numbers.length; i++) { System.out.print(numbers[i]+" "); } System.out.println(); //Sorting in ascending order using bubble sort bubbleSortInAscendingOrder(numbers); //Displaying the numbers after sorting System.out.print("Before sorting, numbers are "); for(int i = 0; i < numbers.length; i++) { System.out.print(numbers[i]+" "); } }
Using sorted(array,reverse=True)
In ascending order, perhaps!
Highlight the numbers and click on the sort button. You can sort ascending (smallest to largest) or descending (largest to smallest).
You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.You can sort the data in ascending or descending order.
You use the relevant formula.
To sort from smallest to largest. Ascending means to go up.
Select the data you want to sort. Then use the Sort option, picking A to Z for ascending order or Z to A for descending order. You can choose which columns to sort by and even to do primary and secondary sorts, like sorting first by surname and then by first name.
Sorting in ascending order refers to arranging a set of data from the smallest to the largest value. This can apply to numbers, letters, or dates, where numbers are sorted from lowest to highest, letters from A to Z, and dates from the earliest to the latest. For example, if you have the numbers 3, 1, and 2, sorting them in ascending order would result in 1, 2, and 3.
ascending sort
Sort the array then traverse the array, printing the element values as you go.
In ascending order and in descending order.
No. They can be sorted either ways. Ascending or Descending.
uitihyiuiphoiphuihyi