why my coding cannot give the correct answer?
somebody help me please..here my coding
import java.util.Scanner;
public class SumNumbers4 {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
System.out.println("How many number?");
int numNumber = scanner.nextInt();
int data = 0;
int max = data;
int min = data;
int sum = 0;
for(int i = 1;i<= numNumber ; i++) {
System.out.println("Please input number" + i + ":");
int number = scanner.nextInt();
sum += number;
}
System.out.println("Sum of the number is" + sum);
double average = sum/numNumber;
System.out.println(" The average is" + average);
if (data> max){
max = data;
}
else if (data < min){
min = data;
}
else if (data >= 0 & data < max){
min = data;
}
else if (data<= 0 & data> min){
max = data;
}
System.out.println("The largest number is" + max);
System.out.println("The smallest number is" + min);
}
}
:(