Solved

How to sort numbers in descending order

Posted on 2004-04-27
10
816 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pressing cancel button with C# UI Automation 3 92
Named range not carried over 10 66
Windows shortcut location resolution on double click open 4 53
Problem to Office 1 44
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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

733 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