minmum and exeding value and maybe avg

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alaa1234
    New Member
    • Aug 2010
    • 3

    #1

    minmum and exeding value and maybe avg

    i have a problem in c++ the problem is :
    In particular, you will write a program that prompts the user to enter the number and values of these donations. After that your program will provide the user with the following menu options:

    1) Calculate the average donation.
    2) Calculate the minimum donation.
    3) Calculate the number of donations exceeding certain value.
    4) Quit
    i did the array for the donatoins
    and the avarge but it is not working and the quit but the minmum and the exeding value no i canot do it,if u want me to send you my code that will be okay,can u help me
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    Please provide a code snippet showing how you find the minimum and maximum values.

    Comment

    • alaa1234
      New Member
      • Aug 2010
      • 3

      #3
      but i donot know how to find the minmum,like avarge the sum of integers/thier numbers like x+t+y/3

      Comment

      • alaa1234
        New Member
        • Aug 2010
        • 3

        #4
        i need help in exding value

        Comment

        • whodgson
          Contributor
          • Jan 2007
          • 542

          #5
          So....you have all the values in your array. To get the average as you say you have to sum the values and divide this sum by the number of array segments. You say this is not working.Please post your code so that we can identify the causal factors. To find the minimum of the array elements set array[0]=min. Then as you go through the remainder of the array elements if the element value is <
          min, make it the new min. Unfortunately no-one can really help you until you post some code

          Comment

          • johny10151981
            Top Contributor
            • Jan 2010
            • 1059

            #6
            You need to define clearly what you mean by minimum
            If by minimum you meant the smallest donation then it is a simple method. and this is not calculating. this is finding.

            If by minimum you meant any theory of statistics then you need to understand that mathematical theory properly.

            Comment

            Working...