#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,temp,a[7];
clrscr();
printf("Enter 7 integer numbers: \n");
for(i=0;i<7;i++)
scanf("%d",&a[i]);
for (i=0;i<7;i++)
{
for(j=i+1;j<7;j++)
{
if(a[i]<a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
printf("\n\nThe 7 numbers sorted in ascending order are: \n");
for(i=0;i<7;i++)
printf("%d\t",a[i]);
getch();
}
To write a C++ program to display the student details using class and array of object.
In Maths, we often talk about ascending and descending order. Ascending order is writing numbers from smallest to largest. Descending order is writing numbers from largest to smallest.
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]+" "); } }
Writing a C program that uses dynamic memory allocation to sort names in ascending order is a typical computer science assignment. To write this program, you must be in UNIX.
Use a looping structure. The first step initialises a loop control variable, n, to zero. You then begin the loop by processing the nth element from the array (the process may be a simple print statement). You then increment n. Finally, you test the value of n; if it is less than 10 you start a new iteration of the loop, otherwise you proceed to the end of the flowchart.
sorry
draw a flow chart to arrange 3 numbers in ascending order
addends
This is known as arranging the numbers in ascending order.
Ascending means increasing in value or moving higher, while descending means decreasing in value or moving lower. In a numeric sequence, ascending would go from lowest to highest, while descending would go from highest to lowest.
To arrange the numbers 7, 9, 56, and 72 in ascending order, you would start by comparing the numbers from left to right. The smallest number is 7, followed by 9, then 56, and finally 72. So, the numbers arranged in ascending order would be 7, 9, 56, and 72.
Arrange the numbers in ascending order, and then take the mean of the fourth and fifth number.
When you are given some numbers just arrange them in ascending order and you will the smallest number which can be made out of those given numbers.
In ascending order: 2.8, 8.02, 8.2, 22.8, 28.2
4.78 4.8 4.89 4.9 are the numbers arranged in ascending order.
From ascending order, the numbers will be:0 , 0.01 , 0.1 , 1.0
its arranged by ascending and descending order.........