一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
2017-12-28 09:51
405 查看
public class StudentPerformanceCalculation {
public static void main(String[] args) {
int b=0;
float score[] = { 83.0f, 83.0f, 83.5f, 96.0f, 57.0f, 98.5f,52.5f,43.5f,60.5f,78.0f};
for (int i = 0; i < 10; i++) {
if ( score[i]< 60) {
b++;
}
}
System.out.println("不及格的学生人数:" +b );
}
}
public static void main(String[] args) {
int b=0;
float score[] = { 83.0f, 83.0f, 83.5f, 96.0f, 57.0f, 98.5f,52.5f,43.5f,60.5f,78.0f};
for (int i = 0; i < 10; i++) {
if ( score[i]< 60) {
b++;
}
}
System.out.println("不及格的学生人数:" +b );
}
}
相关文章推荐
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩存在长度为10的数组中,计算不及格的学生数目
- 一个班级的学生成绩在长度为10的数组中,计算不及格的学生数目。
- 学生成绩存在长度为10的数组中,计算不及格的学生数目
- 在一个长度为10的整型数组里面,保存了班级10个学生的考试成绩。要求编写5个函数,分别实现计算考试的总分,最高分,最低分,平均分和考试成绩降序排序
- 综合利用数组以及条件分支计算一个班级的成绩
- Linux-C基础知识学习:C语言作业-将5个学生成绩保存在一个数组中,单独实现一个计算平均成绩的average函数, 在main函数中获取该函数返回的平均值,并打印。
- JAVA 数组实例-求学生平均成绩,与计算数组的长度
- 在学生成绩表中,显示存在有85分以上成绩的课程号,并且统计各门课程不及格人数在10人以上的课程数量
- 建立一个学生结构数组来记录学生信息(学号ID,姓名和C语言成绩),要求动态建立一个结构数组,数组长度从键盘输入,自行给数组元素赋值并打印学生信息,最后不要忘记释放内存。 结构st