阅读背景:

如果用户必须提供1到10个数字,我是否使用数组或while循环?

来源:互联网 

I have to make a program that calculates the arithmetic mean and standard deviation for up to 10 numbers. Also, further inputs are stopped when the user types the number 0. I have tried using an array with the size of 10, but then I didn't find out the right way to calculate the arithmetic mean because the sum of numbers was divided by 10 every time, although I've typed less than 10 numbers. I'd just like to know if I should use a different approach in this scenario and not use arrays. Note: This is a homework assignment, I'm not allowed to use Lists.I have to make a program that calculates the ar




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: