Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

write a c++ programme that calculate the standard deviations of number inputs

0 votes
asked Jun 19, 2019 by anonymous

1 Answer

0 votes
answered Jun 24, 2019 by SalmanSubetha (140 points)

// Standard Deviations of n number

#include <stdio.h>
#include <math.h>
int main()
    float arr[100],sum=0,mean,sd=0,result;
    int i,len;
    printf("Enter the length of array");
    for(i =0; i < len ;i++)
        sum = sum + arr[i];
      mean = sum / len;
    for(i=0;i <len;i++){
        sd += pow(arr[i] - mean,2);
        result =sqrt(sd/10);
    printf("The Standard devision value is %.6f",result);

    return 0;

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.