需要帮助数组...... [英] Need Help With Arrays...

查看:54
本文介绍了需要帮助数组......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我在阿尔伯塔大学测试课程(我15岁,一年的编程,没有C ++)。无论如何,我们必须执行此程序,它要求用户输入10个数字(所有在不同的行上),然后将所有这些数字放在一行,然后平均所有数字。现在我们必须使用while或for循环使用一个数组(好吧,他们希望我同时做两个......)现在我从来没有做过任何数组类型的编码,所以这显然是我陷入困境的地方。 div class =h2_lin>解决方案

任何关于C或C ++的入门书籍中都包含数组。


我只能帮你解决具体问题。


请阅读指南


好的帮我处理代码,以便程序询问并将他/她输入的10个数字放入数组中。


< BLOCKQUOTE>确定。告诉我你到目前为止。


Okay so I''m at the University of Alberta testing out programs (I''m 15 btw with a year of programming and no C++). Anyway we have to do this program where it asks the user to input 10 numbers (All on different lines) and then put all those numbers on a single line and then average out all the numbers. Now we have to use an array using a while or for loop (Well they want me to do both...) now I''ve never done any array type coding so this is obviously where I''m getting stuck at.

解决方案

Arrays are covered in in any introductory book on C or C++.

I can only help you with specific problems.

Please read the posting guidelines.


Okay help me with the code so the program asks and takes into an array the 10 numbers that he/she puts in.


OK. Show me what you have so far.


这篇关于需要帮助数组......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆