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
bhatia_amritaAsked:
Who is Participating?
 
sunnycoderConnect With a Mentor Commented:
Hi bhatia_amrita,

sort -nr

Sunnycoder
0
 
PerlKingCommented:
Homework question?
0
 
TintinCommented:
Certainly a homework question.

sunnycoder really should have written:

man sort
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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

man sort
0
 
PerlKingConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.