#WSQ10

It is me again with a new post. First of all this code was kind of difficult for one reason, I had no freaking idea how standard deviation works. That was my main problem, until I understood how it works, I mean the math, then I could do the code.

Well, now I´m going to explain what I did. First I include the two libraries I am going to use, in this case is iostream (the one we always use) and math (witch is for math stuff, like power and square root). I forgot to mention that my program should ask for 10 numbers, and make 3 different operations with them and print each result. This operations are sum, average and standard deviation. First what I have to do is ask for those numbers and with that data I should make an array. So I have to ask ten times for ten different numbers, what I did instead of making ten times, I did for loop witch will do what I just explain. What is next in my int main is the lines that print the result for each operation, for being more exact it is printing the result of each function. Then I declare 3 functions, each one will do different things. As you can see my 3 functions are almost the same, they are declare the same way, they use the same information or data and also they use a for loop for solving the problem. The only difference is that the math is different, so you have to change some little things in order to make the function do what you want.

Here is my code: https://www.dropbox.com/s/0iql47lr23x5kkn/wsq.cpp?dl=0

Captura de pantalla 2016-03-15 a las 10.38.06 a.m.

Captura de pantalla 2016-03-15 a las 10.38.18 a.m.

imagen thanks

CC BY-SA 4.0 #WSQ10 by manuelch96 is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.