Results 1 to 6 of 6
  1. #1
    xsdys's Avatar
    Join Date
    Apr 2017
    Gender
    female
    Posts
    26
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic

    Unhappy C Language assignment.

    Good day to all MPGH coders. I've came across a problem in my C language assignment where I have to sort arrays from highest to lowest with the corresponding year for a selected 'hospital type'. But I have the same data for some for some of the years and when I build the program, the hospital with the same data looped many times but still displays the correct answer.

    What it is suppose to display with different data:
    https://imgur.com/a/w7HykML

    What is displayed with similar data:
    https://imgur.com/a/tl1o73m

    Please guys, I need your help!

  2. #2
    MikeRohsoft's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Los Santos
    Posts
    696
    Reputation
    320
    Thanks
    22,836
    I don't understand the full task, i don't understand what is the expected output and i don't see how i can help on your "sorting" if there is no code to take a look in.
    What you expect here now exactly?

  3. #3
    xsdys's Avatar
    Join Date
    Apr 2017
    Gender
    female
    Posts
    26
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    So sorry for the lack of information. The task I had to do was to display the highest to lowest hospital bed available and corresponding year for a selected
    hospital type.
    This was my 2D array in visual studios https://imgur.com/a/kV5yuHy
    This was the data I was given https://imgur.com/a/7sVm7WZ
    This is my function broken down into two images due to lack of space
    https://imgur.com/a/r8jsrIT and https://imgur.com/a/eaR90Zk

  4. #4
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,972
    Reputation
    343
    Thanks
    4,301
    My Mood
    Cheeky
    Are you required to implement a stable sort, or is an unstable sort fine as well? A stable sort preserves the order of elements in when they are the same, unstable *might* change the order.
    Ah we-a blaze the fyah, make it bun dem!

  5. #5
    xsdys's Avatar
    Join Date
    Apr 2017
    Gender
    female
    Posts
    26
    Reputation
    10
    Thanks
    1
    My Mood
    Angelic
    I think a stable sort is needed

  6. #6
    maxibaby's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    1
    I think you should do your own homework

Similar Threads

  1. [Hiring] Somebody to do my language assignment
    By Chanchanbimy in forum Work & Job Offers
    Replies: 5
    Last Post: 12-01-2016, 01:41 PM
  2. [Hiring] To do my assembly language assignment by tomorrow
    By MaximusM in forum Work & Job Offers
    Replies: 0
    Last Post: 10-11-2015, 03:47 PM
  3. iLterate noob language - English translations
    By RebornAce in forum General
    Replies: 4
    Last Post: 04-18-2011, 05:44 AM
  4. Korean language pack?
    By W$t$5TA34TYTHSETH5Y5 in forum WarRock Korea Hacks
    Replies: 6
    Last Post: 05-05-2007, 01:11 PM
  5. Whut Language do hackers use when makeing hacks??
    By jeremywilms in forum Programming
    Replies: 23
    Last Post: 07-04-2006, 12:14 PM

Tags for this Thread