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]);
}
}
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 .....
To get all tutorials of "c programming" Reference:cprogramming-bd.com/c_page2.aspx# prime number
give an example of calculation of mathematics
if u give control ratios used in budgeting i can write program in C/C++
To print lucky numbers in java, you must give the following program: class example { static public void main(String[] args) { System.out.println("Lucky number is your favourite number which is your DOB"); } }
write to him on his fan mail