Solved

How to sort numbers in descending order

Posted on 2004-04-27
10
811 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
  • 2
  • 2
  • 2
  • +3
10 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 25 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
 

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 3

Assisted Solution

by:PerlKing
PerlKing earned 25 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Show shut-down message as Windows 8 shuts down. 9 74
List out all word 7 224
while loop over for loop 7 79
Problem to event 3 50
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now