Welcome![Sign In][Sign Up]
Location:
Downloads WEB Code JSP/Java
Title: qq Download
 Description: 7 8 9 10 11 12 13 14 15 16 17 18 // 帮你弄了一个 你可以去试试 import java.util.Scanner public class JsAvg { public static void main(String[] args) { System.out.println("请依次输入数字用空格分隔,输入0结束") Scanner in = new Scanner(System.in) double n, sum = 0, count = 0 while (true) { n = in.nextDouble() if (n == 0.0) break sum+= n count+= 1 } System.out.println("平均数为:"+ sum/count) } }
 Downloaders recently: [More information of uploader 里斯坚]
 To Search:
File list (Check if you may need any files):
 

qq.txt
aa.txt
ww.txt
    

CodeBus www.codebus.net