Java編程、輸入數(shù)字個數(shù)、平均數(shù)、最小值、最大值減去最小值、
Java編程、輸入數(shù)字個數(shù)、平均數(shù)、最小值、最大值減去最小值、
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.注意,平均值不是實數(shù)!
3) the minimum value of the integers.
4) the maximum difference between any of the integers.
以上要求順序不能顛倒、跪求!
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.注意,平均值不是實數(shù)!
3) the minimum value of the integers.
4) the maximum difference between any of the integers.
以上要求順序不能顛倒、跪求!
其他人氣:375 ℃時間:2020-04-08 08:32:12
優(yōu)質(zhì)解答
測試通過,基本滿足你題目要求,寫得不太好import java.util.*;import java.util.regex.*;public class t10{public static void main(String [] args)throws InterruptedException{Scanner in=new Scanner(System.in);...
我來回答
類似推薦
- 求一個C語言編程 輸入N個數(shù) 求最大值 最小值 平均數(shù)
- java編程,輸出3個數(shù)中的最大值和最小值
- 為下面的字標注音,并按其生母排序排列.
- 今年,小麗和爸爸的年齡比是6:19,兩人相差26歲,爸爸今年( )歲
- 扇形所在的圓的面積為S圓,則圓心角為n°的扇形面積S=
- 一道文言文的題目 求老師解答 快
- 他正在努力想一個更好辦法來解決這個問題(figure 0∪t)英文翻譯
- 11-20的英語翻譯怎么寫
- 寫出命題“若(根號x-2)+(y+1)^2=0”,則x=2且y=-1的逆命題、否命題、逆否命題,并判斷它們的真假.
- A晨昏線總是與經(jīng)線重合 B隨著地球自西向東自轉(zhuǎn) C晨昏線由于地球的自轉(zhuǎn)產(chǎn)生 D晨昏線是晝夜半球的分界線
- 蠶豆葉保衛(wèi)細胞的大小是否一致?為什么?是否有影響精確性的問題?
- having 的讀音 ,是把v和ing 連讀,還是分開讀呢
猜你喜歡
- 1地球上重1千克的物體到月球上重0.167千克,在月球上中12.5千克的物體,在地球上中多少千克?(保留整數(shù))
- 2一個圓柱形容器,底面半徑是10cm,將一個物體浸入容器內(nèi),水面上升1.5cm,物體體積是?
- 3“染色體”是什么?為什么叫 染色體?
- 41/15÷3.25+8/13× 4/15+4/13÷3.75
- 5形容舍不得離開的成語
- 6電阻在電路中有何作用?
- 7巴蜀英才
- 8將質(zhì)量為1.15gNa用刺了孔的鋁箔包裹后放入水中,共收集到1.232L{標況}氣體.
- 9語文反義詞(成語)
- 10如圖,已知∠AOB=40°,點P關于OA、OB的對稱點分別為C、D,CD交OA、OB于M、N兩點,則∠MPN的度數(shù)是?
- 11若關于x的方程x2-(a2+b2-6b)x+a2+b2+2a-4b+1=0的兩個實數(shù)根x1,x2滿足x1≤0≤x2≤1,則a2+b2+4a的最小值和最大值分別為( ) A.12和5+45 B.-72和5+45 C.-72和12 D.-12
- 12一道數(shù)學三角函數(shù)幾何題目