Best Answer

the following program will display all numbers given in the array in ascending order

#include<stdio.h>

void main()

{

int i,h,p;

int numbers[10]={5,8,3,2,6,7,9,4,1,10};

for(p=0;p<=8;p=p+1)

{

for(i=0;i<=8;i=i+1)

{

if(numbers[i]>numbers[i+1])

{

a=numbers[i];

numbers[i]=numbers[i+1];

numbers[i+1]=a;

}

}

}

for(i=0;i<=9;i=i+1)

{

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

}

}

Study guides

☆

Q: Write a program for which give number in ascending number?

Write your answer...

Submit

Still have questions?

Related questions

what is c laungagee?????e

I know how to do this and you need to know how to do this. Why don't you do your best at writing this program and if it does not work then ask for help. You will not learn anything if I give you the answer.

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?

Write a program to convert a 2-digit BCD number into hexadecimal

nr\m;laeoh9y0m g.qthnedxc In fortran: do i=1,5 write(6,*)i enddo stop end This program will write the numbers 1 to 5 on the screen.

ascending order : 8.08,8.3,8.74,8.9 if u r confused in these type of questions..multiply a number say 10 or 100 or 1000 depending on the number of decimals in the numbers which in this case is 100.so the new numbers will be 830,808,874,890. arranging these above number in ascending order will give the ascending order of the original number always.

give me the program which can related on domain and referential integrity.

hello ...can u give me answer how to write program inheretance ... and types of inheretance ..... hello ...can u give me answer how to write program inheretance ... and types of inheretance .....

You write a program just as if you intended to sell it for money, but instead you give it away free.

To get all tutorials of "c programming" Reference:cprogramming-bd.com/c_page2.aspx# prime number

psuedocode is a way of organizing a program before you write it. There isn't really a set standard for it. Instead of writing a program in C write it in english.if (the choice is equal to five){printf("output reponse to user");}Doing this helps you to understand what your code will do and where before you actually write the program

give an example of calculation of mathematics

People also asked