package Calismalarim;
import java.util.Scanner;
public class standart_devitation$_NO_ARRAYS_$ {
static double sum=0;
static double count=0;
static double mean=0;
static double sum_squeres=0;
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("enter 10 numberS:");
double numbers;
for(int i=0;i<10;i++){
numbers=input.nextDouble();
mean(numbers);
sum_squeres+=Math.pow(numbers, 2);
}
System.out.println("mean of array -> "+mean+"\ndevitation -> "+devitation(sum_squeres,10));
}
public static double mean(double sayi){
sum+=sayi;
count++;
mean=(double)sum/count;
return mean;
}
public static double devitation(double kareler_toplami,int input_sayisi){
return Math.sqrt((kareler_toplami-(Math.pow(sum, 2)/input_sayisi))/(input_sayisi-1));
}
}