![]() |
|
#1
|
|||
|
|||
help with Sort arrays/SizeCan someone help me with writing this program please?
I have the first part done (part a). I can't get part (b) or (c). How do I combine part b with part a...this all has to be one program. My instructions are to: Write a program that contain the following functions prototypes: a) int Max( int a, int b ); Function Max takes two intergers as arguements and returns the value of of the largest of the two intergers. b) int Sum( int array[], int size ); Function Sum takes an array of intergers and an interger that indicates the number of elements in the array. The function then returns the sum of all the numbers in the array. c) void Sort( int array [], int size ); //this one is really hard Function Sort takes an array of intergers and an interger that indicates the number of elements in the array. The function takes all the numbers in the array and rearranges (i.e., sorts) them in ascending order. This is what I have so far, as I said..I compiled part a successfully...but how do I do part b and c??? CPP / C++ / C Code:
|
|
#2
|
||||
|
||||
|
Quote:
Quote:
CPP / C++ / C Code:
__________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Merge sort on a linked list | Temujin_12 | C++ Forum | 1 | 06-Mar-2008 20:33 |
| Re: Piping and Redirection | WaltP | C Programming Language | 1 | 11-Apr-2004 08:01 |
| SORT / ORDER BY multi columns in MySQL | misunderstood | MySQL / PHP Forum | 3 | 01-Oct-2003 09:01 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The