954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

can anyone help me with this?

create a program that includes two functions named calcavg() and ariance(). The calcavg() function should calculate and return the average of the values stored in an array named testvals. The array should be declared in main() and include the values 89,95,72,83,99,54,86,75,92,73,79,75,82,73. the variance() function should calculate and return the variance of the data. the variance is obtained by subtracting the average from each value in testvals, squaring the values obtained, adding them, and dividing by the number of elements in testvals. The values returned from calcavg and variance should be displayed using cout statements in main()


==
this is my assignment.. and i really don't know what to do..
thanks a lot.. it will be greatly appreciated..
i hope someone can help me..

more power and god bless...

dextrew
Newbie Poster
2 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

We won't do your homework. You should provide us some code so we can know you've at least tried.
http://www.daniweb.com/forums/announcement8-2.html

unbeatable0
Junior Poster in Training
90 posts since Sep 2008
Reputation Points: 42
Solved Threads: 13
 

pls?...

dextrew
Newbie Poster
2 posts since Dec 2008
Reputation Points: 10
Solved Threads: 0
 

did you really think "pls?..." was gona change the forum rules/attitude?

daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
 

You can do it by your own......... try a little bit.

hiraksarkardg
Light Poster
27 posts since Sep 2008
Reputation Points: 5
Solved Threads: 3
 

>pls?...
Pathetic.

>i really don't know what to do..
What don't you know how to do? All the information is right there, just do one step at a time and i'm sure you can manage it. When you get stuck on a specific problem, we will help. But don't expect anybody to do it for you.

>includes two functions named calcavg() and variance()

float calcavg() {
  // Code Here
}

float variance() {
  // Code Here
}

int main() {
  // Code Here
}


ect..

Getting the picture?

William Hemsworth
Posting Virtuoso
1,591 posts since Mar 2008
Reputation Points: 1,429
Solved Threads: 129
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You