answersLogoWhite

0


Best Answer

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

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you display 15 numbers in an ascending order using an array?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

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.


Sort array in ascending descending order in python?

Using sorted(array,reverse=True)


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(System.in); //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!


What does descending mean in maths?

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.


Can you help to create a code for Visual Basic 6.0 that accepts three numbers and display it in ascending order coz im a beginner?

Look into bubble sort, it is one of the simplest sorting algorithms.

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 arrange 4 numbers in ascending order without array?

addends


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

sorry


How can you write a c program to display numbers in ascending order in array?

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.


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


Sort array in ascending descending order in python?

Using sorted(array,reverse=True)


Which way is ascending and descending?

Ascending order is when numbers are arranged from the smallest to the largest. Descending order is when numbers are arranged from the largest to the smallest.


Draw a flowchart to arrange 3 numbers in ascending order?

draw a flow chart to arrange 3 numbers in ascending order


Vhdl code for assending order of numbers?

vhdl code for ascending order of numbers


What clause should be used to display the rows of a table in ascending order of a particular column?

Order by


What are Numbers listed least to greatest is in what order?

ascending


What is an order in which whole numbers are arranged from the least to the greatest?

ascending order