import java.util.Scanner;
//作业要自己做
public class Zuoyeyaozijizuo{
//作业要自己做
public static void main(String [] args){
}
public static boolean isPrime(int number) {
for(int i=2;i<=number/2;i++)
if(number%i==0)
return false;
return true;
}
// Method to find and print the minimum/maximum/mean of a set of positive numbers
public static void computeStatistics(int sentinel) {
// add code here
Scanner scanner = new Scanner(System.in);
int value =0,count=0;
double mean =0.0;
int minimum =Integer.MIN_VALUE;
int maximum =Integer.MAX_VALUE;
//作业要自己做
while(true){
int tem = scanner.nextInt();
if(tem==sentinel)
break;
if(temminimum =tem;
if(tem>maximum)
maximum =tem;
mean+=tem;
count++;
}
//作业要自己做
System.out.println( "Count: "+count);
System.out.println( "Average: "+mean/count);
System.out.println( "Maximum: "+maximum);
System.out.println( "Minimum: "+minimum);
}
}
可以写 还写吗 写就see my name , find me ..