Search
Search titles only
By:
Search titles only
By:
Menu
Forums
New posts
Search forums
Home
What's new
New posts
Latest activity
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Reply to thread
Home
Education
Academic
Showing mean and variance - Weddo
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="v32457_p" data-source="post: 531" data-attributes="member: 5"><p>Showing mean and variance </p><p></p><p>Hello!</p><p></p><p>I'm writing a program that calculates and shows the mean and variance of two integers. The result I'm getting is 7. But that's not the mean of 5 and 10 (num1 and num2). What can I do to show both mean and variance together on the screen? What should I put after return to show both mean and variance?</p><p></p><p>Thank you.</p><p></p><p>#include <stdio.h></p><p></p><p></p><p>double statistics (int x, int y){</p><p></p><p>double mean, var;</p><p></p><p>mean = (x+y)/2;</p><p>var = ((x-mean)*(x-mean) + (y-mean)*(y-mean)) /2;</p><p></p><p>return...</p><p></p><p><a href="https://www.go4expert.com/forums/mean-variance-t35472/" target="_blank">Showing mean and variance</a></p></blockquote><p></p>
[QUOTE="v32457_p, post: 531, member: 5"] Showing mean and variance Hello! I'm writing a program that calculates and shows the mean and variance of two integers. The result I'm getting is 7. But that's not the mean of 5 and 10 (num1 and num2). What can I do to show both mean and variance together on the screen? What should I put after return to show both mean and variance? Thank you. #include <stdio.h> double statistics (int x, int y){ double mean, var; mean = (x+y)/2; var = ((x-mean)*(x-mean) + (y-mean)*(y-mean)) /2; return... [URL='https://www.go4expert.com/forums/mean-variance-t35472/']Showing mean and variance[/URL] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Education
Academic
Showing mean and variance - Weddo
Top
Bottom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…