473,382 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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
Aug 7 '10 #1
5 1355
donbock
2,426 Expert 2GB
Please provide a code snippet showing how you find the minimum and maximum values.
Aug 7 '10 #2
but i donot know how to find the minmum,like avarge the sum of integers/thier numbers like x+t+y/3
Aug 7 '10 #3
i need help in exding value
Aug 8 '10 #4
whodgson
542 512MB
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
Aug 9 '10 #5
johny10151981
1,059 1GB
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.
Aug 9 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Duffey, Kevin | last post by:
I don't know if jdbc/java code requires this, but when I use two gui admin tools I found, and I insert a row into the table using their row editor feature, both require me to enter a number for the...
2
by: Terry Burns | last post by:
I want to use a collection of value pairs but dont want to be restricted to unique keys. Does anyone know how I can do this. I dont want to use an array because I need the flexibility of a...
3
by: startsmart | last post by:
Hi This is first time to write and alse it is first time to show this site my problem is i need to pass value from any input type like text for example to hidden field I tried to make a...
1
by: SSPoke | last post by:
Hello I attempted to make one in VB.NET but it dind't work at all.. Private buffer() As Byte 'OUTPUT OF BITS goes here Dim bitPosition as Integer = Buffer(i) * 8 'current position of Buffer...
1
by: Winpygsfli | last post by:
I have an application that has an iFrame wich houses a form. I need to read the value of a specific input field from the iFrame. iFrame - portalArea Form - frmUserProfile Input field -...
1
by: dlccprb | last post by:
good afternoon I am trying to set a field in a form to "Yes" automatically when i hit the command print in the form any ideas are welcome
7
by: eliss | last post by:
I'm using dl.call() to call a C function in an external library. It's working great so far except for one function, which returns an unsigned int in the C version. However, in python it returns a...
12
by: haridharmajan | last post by:
In my form i have two fields say fld1 and fld2. fld1 have data like 1,2,3,8,20. now I need to calculate the length of fld1 and assign it to fld2 he in this example fld2 must have 5. I used ...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.