Author Archives: Osvaldo Mendoza

#mastery23

Hello everybody i have donde this activity which is about vectors, a vector can be very useful in many situations, but to understand better I recorded a video explaining about it, I will leave it below.

 

My code:

https://www.dropbox.com/s/qgnwkw2m4mmoqxj/mastery23.cpp?dl=0

My video:

https://www.youtube.com/watch?v=A-bMQRZdd4A

#mastery26

In this activity I made a matrix in C++, but furthermore I made a video explaining how to do a matrix, so It can help you if you need.

Code:

https://www.dropbox.com/s/v4u0roethxbvyu6/mastery26.cpp?dl=0

 

My video:

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

#WSQ10

I have finished my wsq 10 were I had to used new things so I had to research for more information, the program was made with three funtions, one made the sum,the other the average, and the alst one made the standar desviation, but of cours, before that I asked the user for ten number, I will leave my code in the next link:

https://www.dropbox.com/s/hfng3z88dxar1it/Wsq10.cpp?dl=0

#WSQ12

Hello class I have done my wsq number 12 which is about the common greatest divisor, so I use a method that I found in wikipedia: http://en.wikipedia.org/wiki/Greatest_common_divisor   so I have to ask to the user for two numbers and tell him/her the greates divisor, I will leave my code in the next link:

https://www.dropbox.com/s/98zc9uesxkjdofu/Wsq12.cpp?dl=0

#WSQ13

Hello, I have donde this wsq which is about the babylonic method, so there already an algoritm established to calculated te square root, which is a loops.

I found the algoritm of this method in wikipedia: Cálculo de la raíz cuadrada      http://es.wikipedia.org/wiki/C%C3%A1lculo_de_la_ra%C3%ADz_cuadrada#Algoritmo_babil.C3.B3nico and that is how I helped me, but in reality you only need to undestand the algoritm and after that ask the value to the user.

I made it in a funtion:

 

my code is here:

https://www.dropbox.com/s/anqg9m9utqyy2fm/wsq13.cpp?dl=0

#mastery25

Hi classmates and teacher, I have done mastery 25 and I made a video in order to can help you if need, I will leave the links below:

Code: 

https://www.dropbox.com/s/a9sca3jxgmc84ud/mastery25.cpp?dl=0

 

My video: 

https://www.youtube.com/watch?v=4BbgQfn03ug

 

Video that helped me:

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

#mastery24

Hello, in this case i am going to show my program which is array, which a variable that can take a lot of values.

here is my code:

https://www.dropbox.com/s/qu8arukvd6a01oj/mastery24.cpp?dl=0

#mastery 22

 

In this mastery I am going to expalin when to use a type of repetition.

 

FOR:

We can use for as a loop when you know very well how many times the repetition will be done.

example:

for(i=1; i<=10; i++)      In this case I know that the loop is going to be repeated 10 times, so now I can use a FOR loop

 

DO WHILE:

We use a do while when you are not sure how many times the loop will be repeated, it is going to continue while the conditional is true, when it is not it will go out of the loop.

example:

do {

cout <<“Hello<< endl; 

} while (nu

1==1); 

as you could see we d

mo not know how many times it is going to be done 

 

WHILE DO:

It is exactly the same than the do while, but in this case the structure is the oposite and at the first time it is going to do the order if the condition is true.

example:

while (num1==1); do {

cout<<“Hello”<< endl;

}

 

 

#mastery18

Hello, here is my for which is nesting conditionals, so it is when you have many posibles answer and each one has a different result.

In order to do this easier I will put my link here:

https://www.dropbox.com/s/kkm48yspqalw301/Mastery18.cpp?dl=0

#mastery21

Hello class, this is for

I am going to show you my code about recursions, which is when a funtion call itself in different times

I can show this with fibonacci.

Code in the next link

https://www.dropbox.com/s/m0uxfmow8ntuak9/Mastery21.cpp?dl=0