standard deviation

im taking computer analysis and computations at ucf so im still a little new to c, im trying to figure out the standard deviation for a undefined number of entered numbers, i understand everything all the way up to when i need to store my entered number for later use, any suggestions??... here is what my code looks like so far

// standard deviation
#include<stdio.h>
#include<windows.h>


float mean, x, s, total;
int count;

int main(){
x = 0;
count = 0;
total=0;

printf("Enter your values, -1 to end: ");
scanf("%f", &x);

while(x != -1){
count = count + 1;
total= total + x;

printf("Enter your values, -1 to end: ");
scanf("%f", &x);

// this is where im lost
}
mean = (float) total / count;


(
Topic archived. No new replies allowed.