answersLogoWhite

0

#include <stdio.h>

#include <conio.h>

void main()

{

int n ,i,j,temp,a[12]; //in a[] specify some number .

printf("Enter the no of inputs:");

scanf("%d", &n);

printf("Enter %d integer numbers :", n);

for(i=0;i<n;i++)

{

scanf("%d",&a[i]);

}

for (i=0;i<n;i++)

for(j=i+1;j<n;j++)

{

if(a[i]>a[j])

{

temp=a[j];

a[j]=a[i];

a[i]=temp;

}

}

printf("THE %d NUMBERS SORTED IN ASCENDING ORDER ARE :\n", n);

for(i=0;i<n;i++)

{

printf("%d ",a[i]);

}

getch();

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Create a program which accepts a number not less than 10The program prints the reverse of the number?

ten


C program to fine the largest of 10 given number?

first sort the ten numbers in descending order and print the first number. That will be the largest no


How are elements with the same number of valence electrons arranges in the periodic table?

it is the number of protons.the atomic number.


How do you Write a program in 'c' language which accepts int numbers from the users print its reverse number x function which return value?

question clarity


What does atomic number have to do with the periodic table?

The atomic number is what arranges the elements (1,2,3,4........). It also tells the number of protons


The periodic table arranges elements by increasing .?

mass


Is descending order from high to low?

Numbers are said to be in descending order when they are arranged from the largest to the smallest number.


What is the number after 307899?

307900 ascending 307898 descending


What is the flowchart and pseudocode for a program that accept and displays the factorial of a number?

A flowchart for a program that accepts and displays the factorial of a number would include the following steps: Start, Input the number, Initialize a variable for the factorial, Use a loop to calculate the factorial by multiplying the variable by each integer up to the number, Output the result, and End. Pseudocode for the same program would look like this: START INPUT number factorial = 1 FOR i FROM 1 TO number DO factorial = factorial * i END FOR OUTPUT factorial END


As the number line is read from right to left the integers are in?

Descending order.


What is ascending number?

An Ascending # is a # That Is Getting Larger. A Descending # is a # That Is Getting Smaller.


What does descending in algebra mean?

Descending (in a sequence) means that a the next number is "more negative" or "closer to negative infinity" or "less positive" or "further from positive infinity" or if n is a number in a sequence and n+1 is the next number then n/n+1 &gt; 1