943,645 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 522
  • C++ RSS
Dec 17th, 2008
0

can anyone help me with this?

Expand Post »
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...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dextrew is offline Offline
2 posts
since Dec 2008
Dec 17th, 2008
1

Re: can anyone help me with this?

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
Last edited by unbeatable0; Dec 17th, 2008 at 10:43 am.
Reputation Points: 42
Solved Threads: 13
Junior Poster in Training
unbeatable0 is offline Offline
90 posts
since Sep 2008
Dec 17th, 2008
0

Re: can anyone help me with this?

pls?...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dextrew is offline Offline
2 posts
since Dec 2008
Dec 17th, 2008
0

Re: can anyone help me with this?

did you really think "pls?..." was gona change the forum rules/attitude?
Featured Poster
Reputation Points: 437
Solved Threads: 204
Posting Virtuoso
daviddoria is offline Offline
1,968 posts
since Feb 2008
Dec 17th, 2008
0

Re: can anyone help me with this?

You can do it by your own......... try a little bit.
Reputation Points: 5
Solved Threads: 3
Light Poster
hiraksarkardg is offline Offline
27 posts
since Sep 2008
Dec 17th, 2008
1

Re: can anyone help me with this?

>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()
C++ Syntax (Toggle Plain Text)
  1. float calcavg() {
  2. // Code Here
  3. }
  4.  
  5. float variance() {
  6. // Code Here
  7. }
  8.  
  9. int main() {
  10. // Code Here
  11. }
ect..

Getting the picture?
Last edited by William Hemsworth; Dec 17th, 2008 at 1:02 pm.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: RightClick Event for button
Next Thread in C++ Forum Timeline: BackgroundImage for Control





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC