how to write standard deviation? : do i calculate my standard deviation in the loop. also i know the formula for standard deviation just not how to get it to accept the numbers from the users. im new to programming so explain everything. also dont mind my sorry attempt at trying to write out Standard deviation formula it wasnt meant to work just to understand SD more
 

    import java.util.Scanner; 
     
    public class readFromKeyboard { 
     
        public static void main(String[] args) { 
           
           
            Scanner input = new Scanner(System.in); 
        
            String inStr = input.next(); 
            int n;
            int i;
            int count=0; 
            int min = Integer.MAX_VALUE;
            int max = Integer.MIN_VALUE; 
            double average=0;
            int sum;
            double deviation = 0;
            
           
            while (!inStr.equals("EOL")) { 
              count++; 
              n = Integer.parseInt(inStr); 
              min = Math.min(min, n);
              max = Math.max(max, n);
              System.out.printf("%d ", n); 
              inStr = input.next(); 
              average += n;
    // really bad attempt here
              deviation = math.pow(n / average,2) ++ / mean sqrt(); 
            } 
             
            
            average = average/count;
            
            System.out.println("\n The average of these numbers is " + average);
            System.out.printf("The list has %d numbers\n", count); 
            System.out.printf("The minimum of the list is %d\n", min);
            System.out.printf("The maximum of the list is %d\n", max);
            
           
            input.close(); 
           
           
        } 
    }

