我的功能有什么问题? [英] whats wrong with my function?

查看:68
本文介绍了我的功能有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的一切都很好......我将所有成绩都读入他们需要进入的每个不同阵列。现在我正在尝试编写一个能够取得成绩并计算百分制平均值的函数。 ..例如:

学生1

7测验分数9 9.33 8 10 5.5 8 10 ==> 5.5分应该下降,返回值:90.55

6项目分数20 47.5 47 45 47.5 48 ==>返回值:94.44

2考试成绩83 87 ==>返回值:85.00

14实验室分数100 98 96 100 98 92 88 96 92 86 92 94 100 96 ==>返回值94.86

继承人得到的内容:

Ok everything is good...I read in all my grades into each of the different arrays that they need to go in. Now Im trying to write a function that takes the grades and computes the average on a hundred point scale...for example:
Student 1
7 quiz scores 9 9.33 8 10 5.5 8 10 ==> the 5.5 score should be dropped, returned value: 90.55
6 project scores 20 47.5 47 45 47.5 48 ==> returned value: 94.44
2 exam scores 83 87 ==> returned value: 85.00
14 lab scores 100 98 96 100 98 92 88 96 92 86 92 94 100 96 ==> returned value 94.86

heres what I got:

展开 | 选择 | Wrap | 行号

推荐答案

好的,我只是尝试了别的东西,但是当我打电话给它并打印出来时输出为零...我得到一个0 --Quiz--

这里它是:...我不知道哪个更接近...我的第一个功能还是这个。
Okay I just tried something else but its outputting a zero when i call it and print it out...i get a 0 under --Quiz--
here it is:...i donno which is closer...my 1st func or this one.
展开 | 选择 | 换行 | 行号


你的函数原型说:
Your function prototype says:
展开 | 选择 | Wrap | 行号


你忽略那部分......我把它修复了程序...我只是试着尝试的东西,我必须不小心发布那个版本。其他的东西是错的。
ya disregard that part....i have it fixed in my program...I was just tryin stuff and I must of accidentally posted that version. something else is wrong with it.


这篇关于我的功能有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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