Quiz #3

So this was the Quiz #3, and here you can see what I was supposed to do. First, create a program that calculate the distance between two points given by the user, in the cartesian plane. And the second one, was to create a program that could show you the fibonacci series of a number that was given.Captura de pantalla 2016-02-12 a las 23.24.10.png

For the first problem, you had to calculate the middle point of the two values for “x” and for “y”, then you had to apply the Pythagorean theorem in order to calculate the distance. As you can see for the value of “x” I used a variable called “a” and for the “y” value I used a variable called “b”. After you had the difference between those values (x2-x1 and y2-y1) you must use the Pythagorean theorem and that’s it. Then you had to call the distance function into the main function.

Here you can have a look of this code on GitHub. Captura de pantalla 2016-02-12 a las 18.36.04

For the second program, I worked with my friend Dario. (check out his blog HERE, he has an awesome blog). We tried to understand first the Fibonacci series and then we had to apply it to the code. We spent the rest of the class trying so many ways that we ended up stressed and pissed off with the whole world hahaha. After a few hours I gave it a second chance to this program and I searched for any information that could help me with this problem. I found this article that gave an idea of the structure of the program.

http://code.runnable.com/UqfN-4zVBhVwAAH9/solving-the-fibonacci-number-sequence-using-recursion-in-c%2B%2B-for-recursive

Here you can have a look of this code on GitHub. Captura de pantalla 2016-02-12 a las 18.35.41.png

And when the second program finally worked, I was like… #youknowthatfeel

jixctemu5rcpo

Thanks for reading! Peace…

5nczoumgibjzo

Alex H.

24294566811_7004231734_k
Another Sunrise over the

by Rogg4n Link on Flickr: https://www.flickr.com/photos/128294308@N05/24294566811/in/explore-2016-01-14/

CC BY-SA 4.0 Quiz #3 by alexhfoo is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.