I'm a noob at C++ (I learned it at school, so, yeah...) and I've got to make a program, which I find pretty difficult. i'm coming here seeking your help because I NEED a good grade if I want to validate my semester, and programming is highly coefficiented, so if you don't help me, i'm pretty much fucked...
So here's the deal:
Make a program which allows the input of a serie of integers and stocks them in a table, then display the table as it is and then display the table with the numbers sorted out in growing order...
I am a total noob at C (as I already mentioned) and I have no fucking clue about how to do this kind of shit.
So your help would be really, really, REALLY appreciated...
Pretty please?
Name:
Anonymous2007-11-28 10:45
int main(void)
{
// Initialize a (list|table) here
// Loop input collection function here
// Append input to list or break loop if no more input
// ::sort
// Iterate through list and print to stdout
return 0;
}
Fill in the blanks
Name:
Anonymous2007-11-28 10:46
>>2
Oh thank you that was soooooooooooooooooooooo helpful...
Name:
Anonymous2007-11-28 10:49
Look, I know I'm being a dick, but I really need a good grade!
The problem is that I have no fucking clue about how to sort the numbers in growing order (if that wasn't clear enough), so I don't know if you thought you were helping, but, well, you weren't.
>>7
I understand your logic, but I want to understand how C++ works, and that was the first reason why I came here, so you could help me understand it better, thus making me able to write the program I need.
>>19
yup, still haven't solved my problem (link provided by >>16 was helpful, but I can't use it, because we're supposed to use for, while, if and table only (sorry I didn't mention it firsthand)).
So, me and my friend are still working on it.
Name:
Anonymous2007-11-28 16:14
Look, I really need some help to get a good grade. If I don't my parents will beat me again.
Name:
Anonymous2007-11-28 16:31
>>21
That's why we read SICP and learn to program on our own.
Name:
Anonymous2007-11-28 16:34
What's the problem here? Just write a trivial bubble sort and be done with it.
>>24
You have two minutes to write a correct implementation of a sorting algorithm. If you fail, you will be brutally gangraped and then killed. YOUR CHOICE?
>>23
The problem obviously is that I have no idea about how to sort the numbers... (I'm STILL working on it btw, but still, no idea (ones I had didn't work))
Name:
Anonymous2007-11-28 16:45
Just use Monads and lambda haskell over closed manifolds.
Name:
Anonymous2007-11-28 16:48
>>27
As if I had a clue of what you're talking about
Name:
Anonymous2007-11-28 16:48
Why not just use arrays to put the variables in.
And then sort them into another array?
ITT people who prefer bubble sort because they are afraid of full recursion.
Name:
Anonymous2007-11-28 16:58
Well, it's 23:00 where i live (that is to say in france), so i'm going to bed nao, but, remember this, I WILL BE BACK! tomorrow to be exact, I will poast the answer our teacher gave us, and submit it to your judgment.
Thanks to all of you who sincerely tried to help me, I will bump this thread tomorrow (if it still exists) otherwise I will just make another one.