Lists of numbers

list-for-living-2-1xswisr

Got this picture from LegacyProject.

This Wsq was about asking the user for 10 numbers and give him the addition, the average and the deviation number of all of them.

 

The instructions were:

Create a program that asks the user for 10 numbers  (floating point). Store those numbers in a list. Show to the user the total, average and standard deviation of those numbers. For the C++ group you can do this with arrays or Vectors, but you will need to know eventually how to do both.

For this task I decided to use arrays. But…. What is an array?

An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier (Cplusplus).

I got some help with posts of my classmates but also from this pages that might help you to understand: Mathsisfun and Cplusplus.

Here are some pictures of my code and also attach the code on Github. Lists of numbers

Haga click para ver el pase de diapositivas.

As you can see at the begging it was not making the addition correctly, this happened because I was mising a “+” lol ….

CC BY-SA 4.0 Lists of numbers by martikaglez is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.