package november_01st;
import java.util.Scanner;
public class Score {
public static void main(String[] args) {
print_Average_Score();
print_Highest_Score();
print_Lowest_Score();
}
public static double[] re_Score(){
double score[] = new double[3];
System.out.println("please input your first score.");
Scanner input = new Scanner(System.in);
score[0] = input.nextDouble();
System.out.println("please input your second score.");
score[1] = input.nextDouble();
System.out.println("please input your third score.");
score[2] = input.nextDouble();
return score;
}
public static void print_Average_Score(){
double score[] = re_Score();
double count = 0;
for(int i=0;i<3;i++){
count += score[i];
}
System.out.println("The average score is :"+(count/3));
}
public static void print_Highest_Score(){
double score[] = re_Score();
double max = 0;
for(int i =0;i<3;i++){
if(score[i]>=max){
max = score[i];
}
}
System.out.println("The highest score is :"+max);
}
public static void print_Lowest_Score(){
double score[] = re_Score();
double low = score[0];
for(int i =0;i<3;i++){
if(score[i]<=low){
low = score[i];
}
}
System.out.println("The lowest score is :"+low);
}
}