New to C/C++ programming I have an ARRAY question. any Help?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BQuin
    New Member
    • Jan 2007
    • 3

    New to C/C++ programming I have an ARRAY question. any Help?

    Enter into array, 8 marks, then
    Call 3 functions
    greatest
    Smallest
    Average
    Each of these 3 functions will receive as parameters the array of marks as well as the # of elements in the array.
    Greatest will use these parameters to cal. the highest mark and return this value to main.
    Smallest will use these parameters to cal. the lowest mark and return this value to main
    Average will use these parameters. to cal. the average mark and return this value to main.
    Upon receiving the highest mark, lowest mark, and average mark, main will display these 3 pieces of information on screen.
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    This isn't really a question...
    What are you having problems with?

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by BQuin
      Enter into array, 8 marks, then
      Call 3 functions
      greatest
      Smallest
      Average
      Each of these 3 functions will receive as parameters the array of marks as well as the # of elements in the array.
      Greatest will use these parameters to cal. the highest mark and return this value to main.
      Smallest will use these parameters to cal. the lowest mark and return this value to main
      Average will use these parameters. to cal. the average mark and return this value to main.
      Upon receiving the highest mark, lowest mark, and average mark, main will display these 3 pieces of information on screen.
      and when you do decide to post the question make sure you include the codes that you have tried for this (using code tags).

      Comment

      • BQuin
        New Member
        • Jan 2007
        • 3

        #4
        How to write the above program. I dont know where to even start. its an assignment I got from school.

        Comment

        • Motoma
          Recognized Expert Specialist
          • Jan 2007
          • 3236

          #5
          Originally posted by BQuin
          How to write the above program. I dont know where to even start. its an assignment I got from school.
          I would suggest, then, opening the programming book you received/bought when you registered for your class. This should provide you with an understanding of arrays as well and the proper techniques for iterating through them, including control structures such as for and while loops.
          Do you have any code written? Posting this would be a great place to start when asking for help.

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by BQuin
            How to write the above program. I dont know where to even start. its an assignment I got from school.
            But surely you know how to write the shell of the program. Write that and post it.

            Comment

            • cworld
              New Member
              • Jan 2007
              • 15

              #7
              yes it is a simple program. i suggest you to read a simple programming book. then you compare two nos save the no which is large and compare it with third and so on .
              Once you try then if you face the problem then again ask.
              cworld

              Comment

              • BQuin
                New Member
                • Jan 2007
                • 3

                #8
                thanks guys...I'll give it a shot and get back to you

                Comment

                Working...