I need help with my project

This is a discussion on I need help with my project within the C++ Programming forums, part of the General Programming Boards category; Hi this is my first post here and i really need help with my project. Its highschool CS class program ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    4

    I need help with my project

    Hi this is my first post here and i really need help with my project. Its highschool CS class program so should be easy for you guys.

    its looks simple when i look at the question
    but i just cant figure out how to do this.

    my teacher told me to use array for this program

    --------------------------------------------------------------------------------
    its fewer than 50 entries of tests
    for example input is
    98 60 50 60 98 50 74 84
    also negative can be input

    and output should be
    it should be arranged high to lowest grade

    TEST Count
    98 2
    84 1
    74 1
    60 2
    50 2


    I attached simlilar lab assignment i did last week


    please I need help and its due thursday.
    my msn is jp82_1@hotmail.com
    feel free to send message if you know anything
    Attached Files Attached Files

  2. #2
    Master of the Universe! velius's Avatar
    Join Date
    Sep 2003
    Posts
    219
    I'm not sure what part you don't get. You simply need to fill the array and the sort it. You already wrote swap function that can swap elements as needed to sort. I'm glad your high school offers Computer Science. Mine didn't back then at least.
    While you're breakin' down my back n'
    I been rackin' out my brain
    It don't matter how we make it
    'Cause it always ends the same
    You can push it for more mileage
    But your flaps r' wearin' thin
    And I could sleep on it 'til mornin'
    But this nightmare never ends
    Don't forget to call my lawyers
    With ridiculous demands
    An you can take the pity so far
    But it's more than I can stand
    'Cause this couchtrip's gettin' older
    Tell me how long has it been
    'Cause 5 years is forever
    An you haven't grown up yet
    -- You Could Be Mine - Guns N' Roses

  3. #3
    Registered User
    Join Date
    Nov 2003
    Posts
    4
    i dont know how to count array
    like there are 2 98s but i just cant figure out how to count input arrays

  4. #4
    Master of the Universe! velius's Avatar
    Join Date
    Sep 2003
    Posts
    219
    Ok that would depend on what you are allowed to use and what you're not.
    While you're breakin' down my back n'
    I been rackin' out my brain
    It don't matter how we make it
    'Cause it always ends the same
    You can push it for more mileage
    But your flaps r' wearin' thin
    And I could sleep on it 'til mornin'
    But this nightmare never ends
    Don't forget to call my lawyers
    With ridiculous demands
    An you can take the pity so far
    But it's more than I can stand
    'Cause this couchtrip's gettin' older
    Tell me how long has it been
    'Cause 5 years is forever
    An you haven't grown up yet
    -- You Could Be Mine - Guns N' Roses

  5. #5
    Registered User
    Join Date
    Nov 2003
    Posts
    4
    my teacher told me to use multi array but he only gave example for single array.

  6. #6
    Master of the Universe! velius's Avatar
    Join Date
    Sep 2003
    Posts
    219
    One way to do that is to sort the array first then use the second array to store the counts in. That is if the first two entries are the same and the third one is different the store the 2 in the position for each of the two of the array positions. That is store the 2 at index n and index [n-1]. And so forth until the entire array has been checked. I hope this clears things up.
    While you're breakin' down my back n'
    I been rackin' out my brain
    It don't matter how we make it
    'Cause it always ends the same
    You can push it for more mileage
    But your flaps r' wearin' thin
    And I could sleep on it 'til mornin'
    But this nightmare never ends
    Don't forget to call my lawyers
    With ridiculous demands
    An you can take the pity so far
    But it's more than I can stand
    'Cause this couchtrip's gettin' older
    Tell me how long has it been
    'Cause 5 years is forever
    An you haven't grown up yet
    -- You Could Be Mine - Guns N' Roses

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Dynamic Binding
    By gpr1me in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2006, 08:01 AM
  4. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21