⁄⁄⁄⁄⁄⁄⁄⁄⁄⁄Quiz3⁄⁄⁄⁄⁄⁄⁄⁄⁄⁄

Photograph credit

Hi guys, you know I always make a video about wsq’s and quizzes. This time we had to make two programs in quiz 3, the distance program and the fibonacci program. Well I decided not to make a video about the distance program because it’s really not that difficult, instead I made a video about the two ways to make the fibonacci program. First I explain how to do it wit recursion and then with loops. Be sure to take a look at Ernesto’s Blog too

Alexhfoo’s blog: This guys blog is pretty cool, check it out.

Link to the Quiz

code:

Distance.cpp

Fibonacci.cpp

FibLoop.cpp

FibRecur.cpp

Ok for the Distance program I used these images to help visualize what is going on:

imagesimages

As you can see, that line is the distance we want to know, it is the hypotenuse if you look at the picture as a right triangle. So in our program we obviously have to use a squared function and a square root function. Those are pow() and sqrt() respectively. I got these functions from here. It is pretty simple, take a look at my program so you can see one way of doing it.

Here is the video about recursion

And here is my tutorial.

Made by Orlando Lara

CC BY-SA 4.0 ⁄⁄⁄⁄⁄⁄⁄⁄⁄⁄Quiz3⁄⁄⁄⁄⁄⁄⁄⁄⁄⁄ by Orlando Lara is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.