当前位置: 代码迷 >> J2SE >> Question about java,该如何处理
  详细解决方案

Question about java,该如何处理

热度:531   发布时间:2016-04-23 21:05:05.0
Question about java
Here is question about java. I don't know how to pick all numbers in text file and add all them. 

You may assume there are exactly 30 grades in the file. Therefore, you may want to use the count controlled loop (e.g., for loop). Of course, you can use any other loop in your program.
The output of the average is expected to be a floating-point number. The highest and the lowest, however, are expected to be int. 






import java.util.*;
import java.io.*;

public class midterm{
public static void main(String [] args) throws IOException {
Scanner in=new Scanner(new FileReader("grades.txt"));

in.close();


}}







I don't know how to write loop body.


Can anyone come here to help me???
------解决方案--------------------
观瞻观瞻,your english is good。。。
your question is so easy,you used english describe it so nobody to solve。 
------解决方案--------------------
期中作业啊?

——— 

作业还是自己做比较好,
循环这么基础的东西课程资料里面一定有,
这作业涉及的都是最基础的知识: file i/o; data type; String to number; loop ...
如果一开始这么基础的东西就依赖别人,那你后面的课程怎么办?

学校一定有实验课的,不懂问tutor,英语弱、不好意思问都不是借口

作为过来人罗嗦两句,话多莫怪,不喜欢就当我没说,——楼主知道来发帖问已经比那些花钱雇人写作业的强多了 :-)
  相关解决方案