Lists

 

In this wsq I had to do a program where the user had to input 10 numbers whatever and the program have to give him the total of the addition of all the numbers, average and standard deviation of those numbers. Every time I feel this like, ooh look I´am a c++ function, use me but I ´m not going to tell you how to use me so, teach by yourself loser, and I´am like, 🙁 okay (cries in spanish), but this like my teacher said,: It´s not difficult, you only have to remember each one and what they do, and I ´am like 🙁 okay, but kids don´t mess with c++, if you do, maybe it can beat you.

Link to my acount of github:https://github.com/MarAnMu13575/-WSQ10-Lists/tree/master

Links where I found information about the topic:  

http://www.cplusplus.com/reference/list/list/

http://www.cplusplus.com/reference/list/list/

https://www.youtube.com/watch?v=o5wJkJJpKtM

The code:

 <iostream>
 <math.h>
using namespace std;

float aver(float x){
  return (x/10);
}

int main (){
	float array1[10];
	float suma=0;
	float square=0, deviation;
	for (int i=0; i<10; i++)
	{
		cout<<"Introduce an value, and be gentle:  "<<(i+1)<<" : "<<endl;
		cin>>array1[i];
	}

	for (int i=0; i<10; i++)
	{
	suma+=array1[i];
	square+=(array1[i])*(array1[i]);
	}
	deviation=sqrt(square/10);
	cout<<"The addition is equals to: "<<suma<<endl;
	cout<<"The average of the numbers you introduce is: "<<aver(suma)<<endl;
	cout<<"The standard deviation of the numbers you introduce is: "<<deviation<<endl;

return 0;
}

 

15 cute postals for your enemy: http://9gag.com/gag/apB80jE (This is 9gag, this is fun)

 

CC BY 4.0 #WSQ10 Lists by maran13575 is licensed under a Creative Commons Attribution 4.0 International License.