Best Answer

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.

User Avatar

Wiki User

2011-01-01 05:29:39
This answer is:
User Avatar
Study guides
See all Study Guides
Create a Study Guide
12 Reviews

Add your answer:

Earn +20 pts
Q: How can you write a c program to display numbers in ascending order in array?
Write your answer...
Still have questions?
magnify glass
Related questions

How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.

How do you display 15 numbers in an ascending order using an array?

Sort the array then traverse the array, printing the element values as you go.

What will be the program to arrange numbers stored in array in ascending order using pointers?


Accept 5 numbers in an array and display it?

Accept 5 numbers in an array and display it.

Write a program for which give number in ascending number?

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]); } }

How do you arrange 4 numbers in ascending order without array?


How to write Short Java program to sort a sequence of numbers 2345 12 1 111 in ascending order?

To sort any array of numbers, use the built in Arrays.sort() methods. int[] array = new int[]{2345, 12, 1, 111}; Arrays.sort(array);

How do I wwrite a Program that prints all prime numbers from an array?

How do Iwrite a Program that prints all prime numbers from an array?

Write a c program to arrange the digits of a number in ascending order?

Computer programmers use an array to arrange digits of a number in ascending order. The program uses character array to store the digits and a quick sort feature to sort them.

Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.

How do you create Write a program that takes 10 integers as input The program will place these integers into an array and display the following 1. List in ascending order 2. mean 3. median 4.max val?

import java.util.Arrays; import java.util.Scanner; public class Answers { public static void main(String[] args) { //Creates a scanner object named console. Scanner console = new Scanner(; //Variabels int [] numbers = new int [10]; double avg = 0.0; double median = 0.0; int max = numbers[0]; double count = 0.0; //User input. for (int i = 0; i < numbers.length; i++){ System.out.print("Number: "); numbers[i] = console.nextInt(); } //break System.out.println("==============="); //finds the average and max value. for (int i = 0; i < numbers.length; i++){ count += numbers[i]; avg = count / numbers.length; //average if (numbers[i] > max){ //finds the max value. max = numbers[i]; } } median = (numbers[4] + numbers[5])/2; //Median value //Display to user. System.out.println("Highest value found: " + max); //Show maximum value found in array System.out.printf("Median is: %.3f \n",median); //Show median System.out.printf("Average is: %.3f \n",avg); //Show average sortAsc(numbers); //Print out whole array ascending } //Method for sorting an Array ascending. public static void sortAsc(int [] array){ for (int i = 0; i < array.length; i++){ Arrays.sort(array); System.out.println(array[i]); } } } This should do everything you asked for, hope this helps!

Program to print all the even numbers of an array in visual basic?

find even number in array

People also asked