i want to add condition if >100 is error but when im try to add the condition the program is running but not what i want... can somebody tell me what should i do..tq
import java.util.*;
public class test_scores
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int num_of_scores,sum,count,temp;
int[]score=new int[100];
sum=0;
count=0;
temp=100;
System.out.print("Number of test scores = ");
num_of_scores=input.nextInt();
do
{
System.out.print("Enter the scores ");
score[count]=input.nextInt();
if(score[count]<temp);
{
temp=score[count];
}
sum+=score[count];
count++;
if(score[count]>temp);
{
System.out.println("error");
++count;
}
{
}
}
while(count<num_of_scores);
sum-=temp;
sum=sum/(num_of_scores-1);
System.out.println("The average is="+sum);
}
}