What i want to do is calculate the square root of the variance in a statistical program i am creating. Anyways here is some of the code of my program, i have already sorted the data using a sort and have done all the other calculations with other functions that i havent posted in this extract of code but i am having trouble finding the square root of (var). In this case since i havent worked it out properly i have given var a permanently value.

Can someone please show me where i am going wrong, i have tried and tried to get it working but i keep getting errors.Code:#include <stdio.h> #include <math.h> #define size 29 void doBubbleSort(double [], int); double calTotalNum(double []); double sqrt(double var); main() { double num[] = {15.5, 17.2, 17.4, 15.2, 15.3, 17.8, 17.5, 18,0, 18.1, 19.5, 17.5, 18.0, 19.5, 17.5, 15.9, 20.0, 16.3, 14.5, 20.5, 20.5, 17.3, 15.5, 15.8, 18.3, 16.5, 16.6, 15.5, 16.2, 16.0}; double totalNum, mean, median, lowerQuart, upperQuart, iqr, var, stdDev; int i, n; n=sizeof(num)/sizeof(double); doBubbleSort(num, n); totalNum = calTotalNum(num); mean = totalNum/size; median=(num[(size+1)/2]); lowerQuart=(num[(size+3)/4]); upperQuart=(num[3*size/4]); iqr=((num[3*size/4]-num[(size+3)/4])); var=4.5; stdDev= sqrt(var); printf("\n\n"); printf(" Statistical report of Data%s\n"); printf("------------------------------------------------------\n"); for(i = 1; i<n; ++i) printf("%6.1lf\n", num[i]); printf("mean temperature : %5.2lf.\n", mean); printf("median temperature : %5.2lf.\n", median); printf("lower quartile value : %5.2lf.\n", lowerQuart); printf("upper quartile value : %5.2lf.\n", upperQuart); printf("inter quartile range : %5.2lf.\n", iqr); printf("variance : %5.2lf.\n", var); printf("standard deviation : %5.2lf.\n", stdDev); printf("\n"); }