[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 821
  • Last Modified:

How to sort numbers in descending order

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
bhatia_amrita
Asked:
bhatia_amrita
  • 2
  • 2
  • 2
  • +3
2 Solutions
 
sunnycoderCommented:
Hi bhatia_amrita,

sort -nr

Sunnycoder
0
 
PerlKingCommented:
Homework question?
0
 
TintinCommented:
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!

 
bhatia_amritaAuthor Commented:
whats man sort?
0
 
sunnycoderCommented:
on your command prompt, enter the command

man sort
0
 
PerlKingCommented:
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
 
prakashagrCommented:
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
 
anupvijayCommented:
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
 
anupvijayCommented:
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
 
bhatia_amritaAuthor Commented:
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.

  • 2
  • 2
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now