Hi all I am using Excel and i am trying to work out how to do the following:
I am doing a Excell excersize for college (to be handed in when we return) and I have to use the 'PMT' function to calculate the monthly repayments of a loan in the spreadsheet  How is this done. MS Online does'nt seem to be very helpful :S
with my calculations () It has came up with £132 per month as payment which is obviously not right can anyone advise on the formula I shound be entering the spreadsheet states:
Loan amount £10,000
No. of Years 10
Annual interest rate 10%
Monthly repament = ?
The other problem with another spreadsheet i am having is I don't know how to get the average of something AND round it to the nearest whole number can anyone advise on how this would be done ?
Thanks
I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.
I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.
You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)
I am using 3 column's let's say A B and C using A and B by inputting daily numbers and the total in C by using formula =A1+B1 all the way down to 30 (monthly totals). What I want is the average on a running average from the C column. I have used the =AVERAGE(C1:C30) but all I get is the divx error.
Have looked at 2 prior 'Running Average' posts, still need help. Issue: Have two columns; 1st is 'number entry' (a new # each day), and 2nd column is the 'Running Avg'. What is the formula that when you add subsequent #s in row 1, the formula automatically adjusts for addition of new number, to then calculate the new 'running avg.' (with out changing the prior 'running averages'.) ....Thanks much.
BJD
Ann Arbor, MI
Hello,
I have a large database on excel (20 000 rows), and need to calculate an average which excludes some values. I tried to use the filter tool and the auto subtotals, but it is too tedious since I need a precise summary day by day for each genre and I have too many lines to do it by hand.
Here is the format of my data :
ASIN  Date  Rank  genre
ASIN contains a product identifier, Date the date when the data was taken, rank the value to be computed and genre is a classifier. I want to automatically compute the average rank of a given genre day by day. Any idea how I could do that?
Here is enclosed a sample data if you want (two days included, bear in mind that the number of product by day may change).
Thanks,
Ataraxiste
Hi Everyone,
In Excel, if I have a worksheet for each week, what is the best way to keep a running yeartodate average of a value that is in each sheet?
More detail: Each day I am tracking the hours spent on work orders and total hours on the clock. At the end of the week I calculate a "documented hours" percentage. (sum of work order ours/sum of total hours). I want to compare this week with previous weeks and keep a running ytd percentage.
I appreciate any help you can provide!
I recently switched jobs and am challenged daily with new Excel spreadsheets. I have a spreadsheet with daily figures (365 rows plus weekly totals) and my boss wants to also see a running average. Is there an averaging formula that will add a new field each time so that I can copy the formula and not need to enter it for all 365 days?
Thanks for your help.
You can use COUNT to give you the number of cell that there are data in and use that number to create your average. Of course there is the AVERAGE function you can use on a range of cells also.
I have percentages in a column (C3 thru Cx) updated daily. I need to show a running average of all successive daily averages. The daily and overall "process average" will then be displayed on a chart. (no problems doing that). The daily figures are calculated from two other columns that make up the %=x/y function.
I can't seem to use any of the existing AVERAGE functions to automatically recalculate the new number of cells to be averaged as they are added each day. I don't want to have to manually write in a c3,c4,c5 then next day c3,c4,c5,c6 etc. averaging sequence.
Hello,
I have an Excel worksheet with columns C  H showing dates, with C being the most recent and H being the earliest.
Most rows have values in all date columns, but some have less than 6 dates
I want to find the average time between the dates, in days, and fill into Column B.
I have not been able to figure this out. Can anyone help?!
Thanks so much. I attached a workbook with some example rows.
Hi guys
I am trying to set up a markbook type thing using excel. File attached.
There are 10 sets of mark. Each set is made up of a academic mark (%), which will be typed in by the teacher. The second column is a symbol which will add or subtract bonus marks. A=25
B=15
C=7.5
D=0
E=15
The teacher will just type in the symbol.
The third column is a hidden column. This column uses an if function which gives the correct bonus mark as described above.
The fourth column must add the marks from the first column and the bonus marks in the third column.
At the end, there must be an average column, which must keep a running average of the marks.
My problem is this, if I use the sum function it returns a 0 value, if no values are entered. This then messes up the average value at the end. How can I enter the sum value so that if no figures are entered the total cell remains blank so that the correct average value is reflected.
Many thanks
Cara
Sorry about freeky subject, I wasn't sure about my nick and paswd
Ok here is the question and it's EXCEL related. I have a long huge spreadsheet with calculated per unit cost per invoice. On monthly basis I would like to calculate the average per unit cost by using the formula =average(a0:a660). I entered that formula but it's calculating the wrong average. IT's including the ROWS which have zero balances. For example if I have only three item in one column it will still devide the total to all 660 ROWS rather then only to three existing numbers.
Any idea why? Any help will be appreciated.
[This message has been edited by Shabby (edited 12062000).]
I am trying to figure if there is a way to average the numbers that are showing in blue in the attached worksheet. I really don't know how to use the AVERAGE function if all the numbers aren't connected. I am using Office 2003 if that helps any.
Thanks!
Any ideas on how to get EXCEL to do a running average in a pivot table?
Can't come up with anything other than superimposing some kludgy formulas on the pivotsheet.
thanks.
Dear Excel Gurus,
I have an Excel 2010 spreadsheet containing data under columns A and B. I want to add a third column (C) and to have Excel populate the fields under C with the averages of readings listed under the B column for each site_id, like I show below:
A B C
site_id reading average

3457701 257 315.508
3457701 350 315.508
3457701 401.6 315.508
3457701 354.3 315.508
3457701 214.64 315.508

3458904 183.05 200.276
3458904 267.13 200.276
3458904 173.25 200.276
3458904 203.30 200.276
3458904 214.64 200.276
3458904 207.16 200.276
3458904 224.66 200.276
3458904 104.63 200.276
3458904 224.66 200.276

3460205 100.00 150.000
3460205 200.00 150.000

3458904 240.33 240.33

.
.
and so on for some 130,000 rows of data
Any help would be appreciated.
Tomis
Hi Guys,
I'm using the average function in excel however its returning #DIV/0! errors because of blank cells. Is there anyway to correct this? Part of the problem is that my cells are not consecutive so every fix I've tried is telling me i have to many arguments for this function.
=AVERAGE(C7,E7,G7,I7,K7,M7,O7,Q7,S7)
Thanks
David
Hi. I have a simple formula:
=AVERAGE(I25,K25,M25,O25,AF25,AH25,AJ25,AL25,BB25,BD25,BF25,BH25)
How do I rewrite the formula to ignore the empty cells that return a zero value?
All I want to average are the cells that have a number. If I delete the zero's in the cells that don't have a number the fomula returns a "#DIV/0!, which another formula picks up, therefore I have to keep the zero value and not delete them.
Thanks!
Bob
I would like to record amounts in Excel 2003 in one column along with the date of the amount. I then want to view a chart of the amounts for the month, quarter, or year. However I will have missing amounts for some of the days. I want excel to calculate an average for the missing amounts. Here is an example of data.
Date Amount
3/1/2016 10.00
3/2/2016 20.00
3/3/2016 0.00
3/4/2016 8.00
3/5/2016 6.00
3/6/2016 0.00
3/7/2016 0.00
3/8/2016 18.00
3/9/2016 0.00
3/10/2016 15.00
3/11/2016 0.00
3/12/2016 19.00
Maybe I would not care to make an entry if there is no amount that day but still want to see it averaged between the two given amounts.
Maybe I should be using Access, log in Excel and transfer to Access.
Read other 2 answersSheet one contains two different columns of data
Sheet two is =IF(Sheet1!O3>0,Sheet1!O3*Sheet1!$I3,"")
I copied the above cell into several places.
Average function for columns. Average works fine for some columns but not others. If I do a sum/count function on the incorrect columns, the correct answer is returned. It appears as though the count part of average sometimes doesn't work. What's even better, in column with all empty cells, some average functions show an empty cell, others, show {#DIV/0!}
Hi there fellow Excel users .... here is my question:
I have researched a number of GREAT Excel sites, but my issue goes a little beyond what I am finding .. and some of the answers I am seeing go a little beyond me ... so I thought this might be the place to go.
In am trying to get rid of Div/0 errors and keep finding a neat little macro or subroutine, you may be aware of it ... but I do not know how to actually put this sub into my spreadsheet. Not even sure if I want to go the macro route ....so here is my issue:
I am using a series of data that is not congruent and using the COUNTIF function ... that is working fine, but I am averaging a series of averages (using weekly averages of some tracking numbers and then making a monthly average from those 4 or 5 averages). Some weeks there are all zeros which gives me, properly, the div/0 error ... well if any week average has the div/0 error, I then get that error for my monthly average of the averages.
If I could just get my weekly averages that equal div/0 to show up as a blank or better yet, ZERO, then I think my monthly average of averages will work out OK.
I am open to any and all suggestions. Thank you all very much for reviewing this post and possible helping out.
Don in Tucson
AizA
Hi,
Does anyone know a formula for the following? Any help would be great.
A simplified example of what Im looking for is:
I want to find a running average for the amount of miles I drive every week. Collumn A is the days of the week, Collumn B is the miles I drive which are added each day and in Cell C1 I need a running average.
So on Monday if I do 100 miles, C1 will be 100 (100/1)
Tuesday I do 200 miles, C1 will be 150 (100+200/2)
etc
I know there is a formula that keeps a running average in collumn C, but I need to have it in just one cell.
Thanks in advance.
The attached has two approaches to your question.
I hope one will work for you.
Is it possible to use the AVERAGE Function with cells that obtain their values by a formula? I guess what I am asking can the AVERAGE Function be sued with cells that contain formulas?
Dear everyone,
I could not seem to get the formula right to calculate timeweighted average for my data. Attached is a sample of my data. I need to get the timeweighted ave for the data B3 to B16. A3 to A16 were corresponding points of time at which each datum was measured. B3 was the baseline.
I think column A cells need to be properly formatted in order to calculate the weighted average, but I don't know how.
Your input will be much appreciated.
Cheers.
Hi guys.
I'm sure I'm making a meal of this, and it should be really easy...
I have an Excel file that has a list of contiguous dates in column B and values in column C.
The date in B2 is a 15/08/2016 (UK date format), which is a Monday.
In col D, I need to enter a formula that gives an average of the values in C column for the corresponding week.
In other words, the formula result should be the same in cells D2: D8, as it is the average of the values in C2:C8.
The date in cell B9 (22/08/2016) is a Monday again, so the average is now for the next week  i.e. in cells D9: D15 the formula result should be the average of the values in C9:C15.
I can do this manually by entering absolute references following in cells D2: D8:
Code:
=IF(ISERROR(AVERAGE($C$2:$C$8)), NA(), AVERAGE($C$2:$C$8))
And then in cells D9: D15
Code:
=IF(ISERROR(AVERAGE($C$9:$C$15)), NA(), AVERAGE($C$9:$C$15))
And so on.
However, this means manually modifying the formula for each week. I'm sure this can be done better by using formula to 'roll' the average once a week, using a combination of IF, WEEKDAY (or WEEKNUM) and OFFSET...
Chz,
G123
Hi @Gram123, I suggest you upload a sample file with nonprivate data, makes it easier to understand.
I was able to calculate average time in my original spreadsheet in Excel 2003. However, when I copied data from that spreadsheet to another & attempted to calculate average time it doesn't work! It keeps returning the error code #DIV/0! which I assume is because many of the times I have (they are all in military time) have a zero in the beginning (i.e., 0:01:25). I would just change the time to regular time, but it needs to stay in the military format. Also, the column that the cells are in are formatted as time. What can I do to get past this?
Hi! Thanks for taking the time to read my question. I have several columns of formulas where the results are random groups of numbers alternating with groups of blanks. The location and group size of the numbers varies. I would like Excel to do a running average of each group of numbers. Can you please tell me what formula I could use to do that?
Thanks again for any help you can give me!
Lyncur
hey all,
for the last several months ive been on a weight loss program and i've tracked my progress using an excel spreadsheet. currently i'm using openoffice (on ubuntu) to update it but it was created in excel 2003. i have a column where i enter my weight every day and i have a cell on another page which returns my most recent entry, for the purposes of projection and trend data, etc. i know im a total nerd about it, but it has worked great. I mostly do this to improve my own excel skills.
anyway, ive been trying to figure out how to get the cell to return the average of my three most recent entries in the weight data column instead of just the one most recent entry. I've been using this function to return the most recent:
Code:
=INDEX(D58:D347,COUNT(D58:D347))
Any ideas on how to adapt that to return the second or third most recent entry? Or is there another function I can use? I know this is such a trivial problem but any help would be appreciated :')
Read other 13 answers
I am currently trying to build a spreadsheet for calculating an individuals production level based on a few criteria:
Must have worked 18 or more hours for the week, anything under 18 hours can't count toward production
Must be the most recent 4 weeks included in the average (anything in the previous weeks must be ignored)
I will be linking a work in progress workbook with some sample numbers, but here are the basics:
I am attempting to calculate a weighted average for both production (hours for the week vs.% of Standard achieved) level and accuracy (units vs accuracy) in I4 and I5 respectively. Production can only be considered valid if an associate reaches 18 hours in that job function. Each week I have to insert a new set of data identical to the previous week, but with updated values. I don't mind manually updating the very simple formula that would be required to find this value, however this is something that I need to share with several nonexcel savvy people in my area.
I am hoping that there is a macro out there that would automagically appropriately update each of the averages whenever a new week is added to the spreadsheet.
I am a novice when it comes to macros, but I would appreciate any help. Thanks
I have a Inspirion 15 5558,with i7, 8GB ram,1TB HDD,My average To reach the login screen was around 45 secs.
I was facing LCD issues, the technician came over and checked the LCD and pasted some stickers on i it so that it can be repaired later.
I found that its taking more than 4 minutes to reach the login screen.
When i contacted the technician he said it was an OS problem and that i should downgrade to 8 or 8.1
so if everyone can comment about their boot time it would be helpful in determining the problem.
Thank you
" I found that its taking more than 4 minutes to reach the login screen ".
I like to suggest you launch "Startup Repair" in Advanced Startup:
A) Type settings in the (Cortana) search bar, Update & Security, and then Recovery
B) Click Advanced Startup, and then " Restart Now "
C) Troubleshoot, Advanced Options, and then Startup Repairs
I also like to suggest you check Startup in Task Manager.Please disable some of the programs that you don't want running in your startup.
A) Type Task Manager
B) Click Startup
In my sheet I am using conditional formating to return 4color traffic lights (using number 03). At the bottom of each colum I want the average of all number 13, excluding any 0s. I am using the formula =AVERAGEIFS(I3:I8,I3:I8,"<=3",I3:I8,">=1").
This is providing the correct answer unless it is a column of all 0s. How can I have the current formula I am using but also if the answer is #DIV/0! for it to return a zero instead of the error message?
An example of what I am doing is attached. Thanks for your help.
Got the desktop working recently, but I'm a tad concerned, the CPU at idle sits
in the 2932C range and goes up to about 40C when I'm playing Microsoft Train
Simulator with [email protected] and other apps in the background. The CPU is at stock
speeds and Rambo says his maxes at 45C and his is at 3.03GHz.
Do I need a case fan to help get the air circulating in the tower box?
__________________
Free Offers Stock Market Charts
Want to bring the Avg Amount, using IF Formula for the below calculations.
This Sheet 2
ColumnA Column B
Grade Group
Avg Amount
A&B
This Sheet 2
C&D
E&F
G&H
I&J
Total
The below data is on Sheet 3 from where the data needs to be taken for the above function
Employee Code
Employee Name
Grade
Amt
0020
Tom
B
24970
0024
Dick
I
24970
0030
Heera
B
24970
3933
Hari
I
10822
3935
P C
C
10822
3936
Vivek
J
10822
3937
Keni
G
10822
0115
atil
D
24970
3939
Swam
J
10822
0166
Samir
A
24970
3940
Taran
H
10822
3941
Sathya
G
10822
3942
Seem
A
10822
0236
Santos
G
24970
Can u please help me with the Average if function.
I'm trying to make a program to calculate the average of grades, can anyone please explain what I'm doing wrong?
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int x,y;
int *p;
int total=0;
int average= total / x;
cout << "Please insert the number of scores "<<endl;
cin >> x;
p= new int[x];
for (y=0; y<x; y++)
{
cout << "Please enter a score: "<<endl;
cin >> p[y];
}
cout << "The scores are: ";
for (y=0; y<x; y++)
cout << p[y] << ", ";
cout<<"The average is: ";
for (int y=0; y<x; y++)
{
total += p[y];
}
delete[] p;
system("pause");
return 0;
}
I am using access 2000 and have a query with the length of stay for 14 clients..What is the best and Easiest way to calculate the average
Just recently moved to a new apartment and had to ditch my dsl for cable. I got the highest service available which was 1536kb/512kb. Now when I do the bandwidth tests on websites I can only get anywhere between 150200kbps. I had a tech com over here and hook it up correctly, or so it seemed, because it was going very slow to start with. He showed me it was working by downloading a 100mb file and the transfer rate was hitting from 150250 KB. Just wondering why it is that the internet seems soooo utterly slow but most of the downloads are realitively fast. Maybe I am misunderstanding some term or something but I know this cable line should be higher on the BW tests than 150200 kbps! I have tried 8 seperate tests to check and all were about the same.
Thanks in advance,
Jim
Ok here is my next problem. sorry to be such a bother.
Please look at the sample, the question will be more clear
Ok lets say I have a list of Cities.
Chicago
Des Moines
St. Louis
Indianapolis
Kansas City
Milwaukee
Minneapolis
Philadelphia
Is there a way I can get an average of work times by city without having to break them up and do them individually?
The sample is just a VERY small portion of the worksheet.
Dear HP Computer On November 3, 2016 morning, I sent my HP desktop computer (Windows10 and MS Office installed) to HP Service Center Jakarta. In front of the HP service personnel, I backed up the data from hard disk as it was the only suggestion given. The computer was in working condition when HP service personnel took it over. On November 7, HP service officer called and said the computer had no problem, and he just needed to fix some files. On November 8, I picked up the computer. At home I found out that the system was "downgraded" to Windows8 and MSOffice was "not properly"installed. As this was a paid service, I think this service was below average of typical services provided by HP. cw
Read other answersHello all!
Some of you may know me. Like my software and WinSxS (I love the way WinSxS all fits together!) but am utterly clueless about the hardware. Please forgive me this question!
I have a DESKTOP PC which is NOT overclocked in any way. It is reasonably powerful (see specs) and is a Dell. However, it is used to the extremes of its ability  regularly.
I would just like to ask you what the temperatures you would consider good, warm, and hot for both the GPU and CPU. I know the GPU can get quite hot, but I would please like to know how hot, so that I can learn.
I have a feeling that mine are quite hot. Most of the time I get:
CPU: 52 degrees Centigrade (C)
GPU: 128 C
These seem awfully hot. Putting my hand on the GPU plastic casing after use makes me think that these are not anomalous!
Thanks so much in advance!
Richard
EDIT: All of the fans have been confirmed as working, and it has good airflow all around, and always has had.
Hello Richard, I am not really knowledgeable in this area & can only reflect on my own research so that i can monitor my own temps which basically indicates 70 degrees C and below in both cases as being comfortable temps.
In posts i have read concern is usually expressed in 80c+, your CPU looks fine mine runs at 5065 & max 72c under heavy load. I use Core temp to monitor which also has overheat protection
http://www.alcpu.com/CoreTemp/
The tjmax is the CPU manufacturers max temp (assume critical) & safe temps to be 15c20c below this.
As far as your GPU it looks extremely hot but i do not have a solution for you other than cleaning & extra cooling which i am sure you are already aware of. (my desktop has settings in the BIOS for the fan)
Here are my temps which are for a laptop;
Hi all! Would you all please tell me what is the temperature range that your P50 or P70 typically operates at? It would also be great if you could measure it under average office use, internet browsing, plus maybe picture/video editing or lowtomidlevel gaming (if you do those sorts of things). Also, to circumvent potential confusion, please denote what machine you have and in what scale you are getting these temp readings.
IBM T40: XP PRO SP3, 14.1" 4:3 display, 512MB DDR RAM, 40GB HDD, ThinkLight, DVD.Lenovo Ideacentre H215: AMD Athlon II X2 215, 500GB HDD, 4GB DDR3 RAM, 64bit Win7, AMD 760G.
Hello all!
Some of you may know me. Like my software and WinSxS (I love the way WinSxS all fits together!) but am utterly clueless about the hardware. Please forgive me this question!
I have a DESKTOP PC which is NOT overclocked in any way. It is reasonably powerful (see specs) and is a Dell. However, it is used to the extremes of its ability  regularly.
I would just like to ask you what the temperatures you would consider good, warm, and hot for both the GPU and CPU. I know the GPU can get quite hot, but I would please like to know how hot, so that I can learn.
I have a feeling that mine are quite hot. Most of the time I get:
CPU: 52 degrees Centigrade (C)
GPU: 128 C
These seem awfully hot. Putting my hand on the GPU plastic casing after use makes me think that these are not anomalous!
Thanks so much in advance!
Richard
EDIT: All of the fans have been confirmed as working, and it has good airflow all around, and always has had.
Hello Richard, I am not really knowledgeable in this area & can only reflect on my own research so that i can monitor my own temps which basically indicates 70 degrees C and below in both cases as being comfortable temps.
In posts i have read concern is usually expressed in 80c+, your CPU looks fine mine runs at 5065 & max 72c under heavy load. I use Core temp to monitor which also has overheat protection
http://www.alcpu.com/CoreTemp/
The tjmax is the CPU manufacturers max temp (assume critical) & safe temps to be 15c20c below this.
As far as your GPU it looks extremely hot but i do not have a solution for you other than cleaning & extra cooling which i am sure you are already aware of. (my desktop has settings in the BIOS for the fan)
Here are my temps which are for a laptop;
My desk top is approx 4 years old , and things are starting to go !
Google Chrome gives me an error and freezes up , Everything else seems to work, so I switched to Yahoo..
IS THIS NORMAL ????
No this is not normal, but many people "refresh" their installation after some time (years).
Can you please fill in your System Specs?
Way cool!
Check out this thread and this forum
Read Before Asking "Is This Too Hot?"
Should help you find info.... :hotbounce
I've been blowing through graphics cards about every 12 months. Even with my new system it's been the same. I do play a lot of graphic intensity games. Could that be the reason for their early demise? The latest casualty is my GTX 560.
A GPU's lifespan is at least 35 years. Hell, if you take care of your components it will last as long as you need it to in most cases. The fact that your GPU's are dieing in a year is strange. If this has indeed happened to all of your GPU's it is safe to say that the operating conditions inside your PC may not be too good. Or, you may just be burning them out? Do you SUPER overclock them or something? What sort of operating temps do you usually get?
i have a dell dimension 3000 and i dont know what an average temp is for pc's but its running around 33C (91F) is that good or bad?
i have one fan blowing out with my side panel off and a little 4 inch desk fan i got from walmart blowing in on the side. my pc room stays around 72F or so no dust either i blow my pc out every couple of weeks
What temp is that case or CPU? If case then what's the CPU temp? Your CPU temp is fine under 65C while under load (gaming, someother heavy processing workout, i.e Prime95). At idle it should be around 3035C with air cooling and standard room temp. 65C is getting hot and I wouldn't want mine to get any hotter then that, in fact that's the upper safe limit. You really want it no hotter then mid 50's. (under load)
Well... I recently notice some lag on my computer and went over to Speedtest.com to check my speed on the computer. With the results calculated, It said that I'm below the average ISP Provider speed and from before tests i have.
My Average Download Speed Before: 17.64 mlbs
ISP Average Download Speed: 7.34 mlbs
My current Average Download Speed:4.08mlbs
My Average Upload Speed Before: 0.48 mlbs
ISP Average Upload Speed: 0.54mlbs
My current Average Upload Speed: 0.41mlbs

With these results tests a couple of times it seems like my computer is need some tune up. Help?

OS: Windows 7
*Don't suggest buying a new computer because I bought this computer this year

Please Reply ASAP, I'm experiencing major slowness and have work to do on the computer, I will check daily if you havn't post anything yet but if you did I will check this thread every minute.
Thanks
Yamato
Hi:
can anyone figure out why the sum and average isn't displaying based on what the user enters? it runs and i get values of 0 for each sum and average...any help by MIDNIGHT WOULD BE GREAT!
Code:
#include<iostream.h>
int main()
{
int y, i;
double g, m=0, a;
cout << "Please enter number of values to be processed: ";
cin >> y;//receiving number of values
cout << "Please enter the " << y << " values:\n"; //asking for those values
a = m/y;
for(i = 1; i <= y; i++)
{
cin >> g;
g += m;
}
cout << "Sum: " << m << "\n"; cout << "Average: " << a << "\n";
cout << "Thank you come again!";
return 0;
}
Here ya go.
BTW, I suggest using var names that
give you an idea of what you're doing,
such as "total", "numentries", etc.
int main()
{
int y, i;
double g, m=0, a;
cout << "Please enter number of values to be processed: ";
cin >> y;//receiving number of values
cout << "Please enter the " << y << " values:\n"; //asking for those values
for(i = 1; i <= y; i++)
{
cin >> g;
m += g; // Add entry (g) to total (m).
}
a = m/y; // divide m (total) by y (number of entries)
cout << "Sum: " << m << "\n"; cout << "Average: " << a << "\n";
cout << "Thank you come again!";
return 0;
}
Hope I'm not doing somebody's homework here...