> 其他 >
Java编程、输入数字个数、平均数、最小值、最大值减去最小值、
write a JAVA program to read in a sequence of integers and print out the following quantities,each on a new line and in the following order,your program should be:
1) the number of integers read in.
2) the average value- which need not be an integer.注意,平均值不是实数!
3) the minimum value of the integers.
4) the maximum difference between any of the integers.
以上要求顺序不能颠倒、跪求!
人气:465 ℃ 时间:2020-04-08 08:32:12
解答
测试通过,基本满足你题目要求,写得不太好import java.util.*;import java.util.regex.*;public class t10{public static void main(String [] args)throws InterruptedException{Scanner in=new Scanner(System.in);...
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版