?
Solved

How to sort numbers in descending order

Posted on 2004-04-27
10
Medium Priority
?
818 Views
Last Modified: 2013-12-26
hi
please tell me how to write a program to sort the numbers input by user in runtime and sort them in descending order
Thanks
Amrita
0
Comment
Question by:bhatia_amrita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +3
10 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 75 total points
ID: 10935678
Hi bhatia_amrita,

sort -nr

Sunnycoder
0
 
LVL 3

Expert Comment

by:PerlKing
ID: 10938863
Homework question?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10944108
Certainly a homework question.

sunnycoder really should have written:

man sort
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:bhatia_amrita
ID: 10947850
whats man sort?
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 10947874
on your command prompt, enter the command

man sort
0
 
LVL 3

Assisted Solution

by:PerlKing
PerlKing earned 75 total points
ID: 10947875
Amrita, guess you are probably a newbie to Unix.
So, "man" is the first place to start. If you want to find out about the usage of any shell command, you would say
man <command>

For example, you want to know more about usage of "ls" command, you would say:
man ls

at the shell prompt.

Let us know if you need more help on that.
0
 
LVL 2

Expert Comment

by:prakashagr
ID: 10975945
pz don't ask silly questions ,
already u got answer from sunnycoder.
and he told to see man page of that command ( for more help ) and u r asking what is that


0
 
LVL 2

Expert Comment

by:anupvijay
ID: 10986295
prakashagr,
That was rude !!!

No question is a silly question,specially if a person is new to an area.
It might be a homework question but then we can always guide a person in the right direction.
There is no need for discouraging comments.


bhatia_amrita,
If you have not found a solution please post here again with what progress you have made and whether you are stuck anywhere.
It would help us if you also give us the environment you are working ....like in your case the operating system etc....

The "man" (stands for Unix "manual") came up because we assumed you are on Unix.

Hope that you get a solution soon.
Cheers.
0
 
LVL 2

Expert Comment

by:anupvijay
ID: 10986304
I am sorry......
Every one was correct in assuming Unix.....I was under the impression that I am posting in the C programming area.

My Bad........
0
 

Author Comment

by:bhatia_amrita
ID: 10986782
thanx a lot for all the help and guidance.:)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month9 days, 5 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question