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

Continue reading “Quiz #3”

·Fun with numbers· #WSQ03

Well, another homework… haha just kidding. I’m learning how to improve my codes and all that stuff. I started reading some articles and looking for examples in c++, as I said previously, I didn’t remember how to write in c++. I spent a time exploring this helpful page. There a lot of tutorials in c++ and references.

Captura de pantalla 2016-01-22 a las 12.03.43

After reading for a while some tutorials and articles, I decided to start writing my code. My objective was to create a program that given two numbers, it could calculate different operations. I looked in some of my classmate’s programs in order to remember how to write all de cout and cin stuff.

And here is the result, after a few mistakes and trying to figure it out what was wrong, my program was finally running!

Captura de pantalla 2016-01-22 a las 12.16.38

And here is my program working in Terminal…

Captura de pantalla 2016-01-22 a las 12.18.30

Also, you can see my code on GitHub here

Captura de pantalla 2016-01-22 a las 12.20.30

Alex H.

24294566811_7004231734_k
Another Sunrise over the Alps by Rogg4n Link on Flickr: https://www.flickr.com/photos/128294308@N05/24294566811/in/explore-2016-01-14/

·Hello World· #WSQ02

After setting up my computer, I had the task of writing the basic code of “Hello World” in C++. The last time I wrote a code in C++ was when I was in high school so there were things that I didn’t remember at all. I had to search the basic commands for C++ and learn them again. After few minutes of writing, my code worked.

Captura de pantalla 2016-01-19 a las 11.57.21

 

Captura de pantalla 2016-01-19 a las 11.51.04

 

Alex H.

 

24294566811_7004231734_k
Another Sunrise over the Alps by Rogg4n Link on Flickr: https://www.flickr.com/photos/128294308@N05/24294566811/in/explore-2016-01-14/