Connecting Tech Pros Worldwide Forums | Help | Site Map

Program to input and order numbers

eyv092291's Avatar
Newbie
 
Join Date: Aug 2008
Location: PH
Posts: 5
#1: Aug 31 '08
"Accept 10 numbers and arranged from lowest to highest"
in Turbo C. I don't know what statement or what logic should be use to arrange the accepted integers from lowest to highest. Please do help us, me and my group mates hardly need this to pass programming. Thank you and God Bless You!! (^___^)v



JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Aug 31 '08

re: Program to input and order numbers


What have you and your group mates done already? And where did you fail to do
whatever you wanted to do?

kind regards,

Jos
Needs Regular Fix
 
Join Date: Jul 2008
Posts: 383
#3: Aug 31 '08

re: Program to input and order numbers


And I would like to know - was it your ( and goupmates' ) tutor who didn't bother to explain anything and started the course with the assignment, or were somebody just slacking all year round?
And btw - complete program can be found in google on the very second page.
eyv092291's Avatar
Newbie
 
Join Date: Aug 2008
Location: PH
Posts: 5
#4: Sep 1 '08

re: Program to input and order numbers


i am trying to use "else if" statement.. hopefully this will work..

lols we don't fail when doing whatever we wanted to do.. xD

i wish ill finish this case report in time.. x_x

^__^v
eyv092291's Avatar
Newbie
 
Join Date: Aug 2008
Location: PH
Posts: 5
#5: Sep 1 '08

re: Program to input and order numbers


Quote:

Originally Posted by newb16

And I would like to know - was it your ( and goupmates' ) tutor who didn't bother to explain anything and started the course with the assignment, or were somebody just slacking all year round?
And btw - complete program can be found in google on the very second page.

newb16
where in google can i find it?.. ?__?
Needs Regular Fix
 
Join Date: Jul 2008
Posts: 383
#6: Sep 1 '08

re: Program to input and order numbers


Quote:

Originally Posted by eyv092291

newb16
where in google can i find it?.. ?__?

You seem to ignore my questions.
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#7: Sep 1 '08

re: Program to input and order numbers


Quote:

Originally Posted by newb16

You seem to ignore my questions.

Not only that but the OP's keyboard seems to produce spurious additional
characters, effectively rendering the messsage quite unreadable. I'll ignore
those messages, they look very childish.

kind regards,

Jos
eyv092291's Avatar
Newbie
 
Join Date: Aug 2008
Location: PH
Posts: 5
#8: Sep 2 '08

re: Program to input and order numbers


Quote:

Originally Posted by newb16

You seem to ignore my questions.

sorry sorry.. yea our teacher still doesn't teach us about that.. she only said that its only about 150++ lines.. but while i am editing im in about 250++.. lol..
eyv092291's Avatar
Newbie
 
Join Date: Aug 2008
Location: PH
Posts: 5
#9: Sep 2 '08

re: Program to input and order numbers


Quote:

Originally Posted by JosAH

Not only that but the OP's keyboard seems to produce spurious additional
characters, effectively rendering the messsage quite unreadable. I'll ignore
those messages, they look very childish.

kind regards,

Jos

sorry sorry.. im just 16.. yea ill try to be more mature.. xD
Needs Regular Fix
 
Join Date: Jul 2008
Posts: 383
#10: Sep 2 '08

re: Program to input and order numbers


Quote:

Originally Posted by eyv092291

sorry sorry.. yea our teacher still doesn't teach us about that.. she only said that its only about 150++ lines.. but while i am editing im in about 250++.. lol..


What? 150+ ? That is too freakin' much. With given requirements and with simplest and dumbest bubblesort ( not that is effective, but involves less brain power ) it is 2(3) lines to input 10 numbers in loop ( you know what loop is, right? ), 8 to sort them in 2 nested loops and 3 lines to output sorted numbers in a loop. Plus 5 some lines for #include, main(), variables declaration.
Expert
 
Join Date: Mar 2008
Location: Naperville, Illinois U.S.
Posts: 830
#11: Sep 5 '08

re: Program to input and order numbers


The point of your exercise is probably for you to find and implement a sort algorithm. There are lots of them to choose from. Maybe you can find the classic text "Sorting and Searching" by Donald Knuth in your library; or you could try googling "sorting algorithms".

On the other hand, if the purpose of this exercise is just to get the job done any way you can (and not learn about sorting), then you might want to take a look at the qsort() library function in <stdlib.h>.

Cheers,
donbock
Reply