Solved

How to sort numbers in descending order

Posted on 2004-04-27
10
815 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Question regarding Copy/Paste 16 96
firstChar challenge 13 119
Excel file not created as expected 7 79
"Black Box" Testing of Control System Software 2 69
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

790 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