+ 3
C codes
Can someone tell me what is wrong with my code please Am trying to use pointer to commute sum, mean and standard deviation https://code.sololearn.com/c63ruMwTMb0n/?ref=app Pls help me explain line 5,6,12,13 and 24
2 Respuestas
+ 2
It has some errors.
** canio.h is drprecated header. Remove it.
** use int main().
** these lines missing semicolon at end
means=sum/n
ptr=a
And means not declared, you may be trying mean
So use
mean=sum/n;
ptr=a;
Comment or remove line 30
5,6 lines are doing variable declaration.
12,13 are accepting input into a array by using a loop. N Input values are stored in array.
These two lines are basic, explained in lessons well.. Revise lessons of variables and user input scanf, to understand more.
Line: 24 is for the calculation of standard deviation. You can find in google for the formulae...
ptr=a ; so now pyr points to array..
you are accessing array by ptr pointer.
edit:
https://www.mathsisfun.com/data/standard-deviation-formulas.html
Hope it helps....
+ 1
yes it helps