CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2011
    Posts
    1

    [RESOLVED] Codes of this problem.....PM me

    Write a program for merging two unsorted 1D double arrays in descending
    order.

    For example:

    Input:

    arr1 8 4 0 2 1
    arr2 9 7 6 5 3

    Output: arr3 9 8 7 6 5 4 3 2 1 0

    Note: You need to define the following functions:

    void inputarray(int size, double* array);

    This function should prompt the user for input and hence input all array elements from the
    user.

    void printarray(int size, double* array);

    This function should print all array elements.

    void sortarray(int size, double * array, char order);

    This function should sort the array which will be given as the first argument. The second
    argument will be ‘A’ or ‘D’ to specify ascending or descending, respectively.

    void mergeandsortarray(int size1, double* arr1, int size2, double* arr2, double* arr3);

    This function should merge the sorted arrays arr1 and arr2 which will be given as the first and
    second arguments. The third argument, arr3, will be the array obviously having the size of array
    being the sum of the sizes of the first two arrays and will store the two arrays in merged and
    ordered form. Note that your function call to this function must pass the sorted arrays arr1 and
    arr2 and then simply merge them. Note that you must NOT use the naïve or simple algorithm
    which would copy the two arrays into arr3 and then sort arr3!


    PM me the codes !!!!!

  2. #2
    Join Date
    May 2007
    Location
    Scotland
    Posts
    1,164

    Re: Codes of this problem.....PM me

    This looks like homework, we are not here to do homework for you.

    Please read this:

    http://www.codeguru.com/forum/showthread.php?t=366302

    Anyone who PM's you the code is helping you cheat, and not helping you to learn how to program.

    Please explain where you are stuck

  3. #3
    Join Date
    Jan 2009
    Posts
    596

    Re: Codes of this problem.....PM me

    Quote Originally Posted by PGV3N0M View Post
    Write a program for merging two unsorted 1D double arrays in descending
    order.

    For example:
    ...
    ...

    PM me the codes !!!!!
    Do you seriously expect people you have never met or even communicated with before to do your homework for you? You didn't even say 'please'!

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: [RESOLVED] Codes of this problem.....PM me

    Quote Originally Posted by PGV3N0M View Post
    PM me the codes !!!!!
    Exclamation points even. Somebody needs to work on his social skills.

    I'll PM you the code right after you Paypal me a contracting fee.

  5. #5
    Join Date
    Aug 2009
    Posts
    440

    Re: [RESOLVED] Codes of this problem.....PM me

    Quote Originally Posted by GCDEF View Post
    Exclamation points even. Somebody needs to work on his social skills.

    I'll PM you the code right after you Paypal me a contracting fee.
    I'll do it for twice what GCDEF wants!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured