Thanks Adak but i will stick to my own code i figure out for the min max and, got the mean square deviation but i dont know is he result it print is correct,cuz every time i calculate with calculator i have diverent value,
Code:
/* LAB 2
* Cery */
/***********************The Code****************************/
#include <stdio.h>
#include <math.h>
int main(void)
{
float seq, sum = 0, mean, min, max;
double squ;
int status, num = 0;
printf("Enter number \n");
scanf("%f", &seq);
min = max = seq ;
while (status)
{
num++;
sum += seq;
if(seq < min) min = seq;
if(seq > max) max = seq;
printf("Enter number(c to calculate) \n");
status = scanf("%f", &seq);
mean = sum / num;
squ = sqrt((pow(sum,2)-num*pow(mean,2))/(num-1));
}
printf("You Entered: %d times\n",num);
printf("The Sum is: %f\n", sum);
printf("The Max of the number: %.2f\n",max);
printf("The Min of the number: %.2f\n",min);
printf("The Mean is: %f\n", mean);
printf("The Mean Square Deviation is: %f\n", squ);
return 0;
}