Below is what I have so far:
I don\'t know how to exclude 0 as a min number though. The assignment asks for 0 to be the exit number so I need to have the lowest numb
This is what I did and it works try and play around with it. It calculates total,avarage,minimum and maximum.
public static void main(String[] args) {
int[] score= {56,90,89,99,59,67};
double avg;
int sum=0;
int maxValue=0;
int minValue=100;
for(int i=0;i<6;i++){
sum=sum+score[i];
if(score[i]maxValue){
maxValue=score[i];
}
}
avg=sum/6.0;
System.out.print("Max: "+maxValue+"," +" Min: "+minValue+","+" Avarage: "+avg+","+" Sum: "+sum);}
}