Author Archives: Juan Pablo Santana

M21 – Use of recursion for repetitive algorithms // M22 – When to use what type of repetition in a program

Hello everybody!

In this video I show you TWO Masteries’ topics: Use of recursion and when to use it.

I use my old Factorial programm to explain this topic and  have a little problem compiling the programm but, at the end, it works. Enjoy it!

https://www.dropbox.com/s/xcxz5u3ksspl0wc/M19-M20%20Recursion.mp4?dl=0

M17 – Use of “switch” as a conditional

Hello everybody! In this video I show you how to use switch as a conditional. I personally, prefer using if or while, but always is good to know something new. Enjoy it!

https://www.dropbox.com/s/c63hd4674kwj010/M17%20Switch.mp4?dl=0

WSQ14 – Calculate e

Hey everybody! In this time, we wrote a code to calculate Euler’s constant or e number. That part was simple, the problem came when we need to stop the programm when we have the precision (decimal point numbers) that we required. To acomplishied that, we use a function called floor which we take from here

http://stackoverflow.com/questions/11208971/round-a-float-to-a-given-precision/11209099#11209099

Anyway, here is the link to my code. Enjoy it!

https://github.com/juanpsantana/WSQs/blob/master/WSQ14.cpp

WSQ13 – Babylonian Method

Hey everybody!!!

Today I wrote a programm which calculates the square root of a number using a computing method called BABYLONIAN. It’s very simple, and you can learn how it works on Wikipedia.

http://en.wikipedia.org/wiki/Methods_of_computing_square_roots

On my code, I put a cout line to see how is it working, but you can just delete it if you want. Enjoy it!

https://github.com/juanpsantana/WSQs/blob/master/WSQ13.cpp

WSQ12 – Greatest common Divisor

Hey everybody!

Here is the code of WSQ13, A Gratest Common Divisor programm. This is the first post after Spring Break vacations, so I will post a lots of things on this day. I hope you enjoy it.

Here is the link to my code:

https://github.com/juanpsantana/WSQs/blob/master/WSQ12.cpp

WSQ11 – YoSoy196

Hey everybody!!

This time we wrote a great code. it’s the longest code I’ve written: 98 code lines!!

Here is the link tho the code:

https://github.com/juanpsantana/WSQs/blob/master/WSQ11.cpp

Enjoy it!!

WSQ09 – Factorial

Hello everybody!

In this time, we wrote a code to calculate de factorial of a number. The funny thing is that I wrote a SUPER-ULTRA-COMPLICATED-CODE, then I learn to do this simply.

Here are the initial code that I wrote, the easy recursive way to do it and the easy loop way to do it 

Enjoy it.

https://github.com/juanpsantana/WSQs/blob/master/WSQ09.cpp

https://github.com/juanpsantana/WSQs/blob/master/WSQ09_recursive.cpp

https://github.com/juanpsantana/WSQs/blob/master/WSQ09_loop.cpp

WSQ10 – Lists

Hello everybody! In this blog we have done a list and worked with array for the first time. 

Here is the link to my code

https://github.com/juanpsantana/WSQs/blob/master/WSQ10.cpp

I used lynda.com to help me understanding this topic

http://www.lynda.com/C-tutorials/Arrays-strings/182674/366532-4.html?autoplay=true

I hope you enjoy it!

Pre Mastery 12 – Creating C++ funtions

Ok.

This is provisional.

Now, I will show you that I can Create a Function.

Perhaps, I will make a video explaining how to do it.

Pre Mastery 11 – Calling C++ Function

Ok.

This is provisional.

Now, I will show you that I can call a Function.

Perhaps, I will make a video explaining how to do it.