Author Archives: Juan Pablo Santana

Mastery 09 – Basic types and their use in C++

Hey there! in this post we are going to talk about fundamental types in C++.

Any value we use in our code, requieres a space in the computers memory. What the computer need to know to run the program correctly is how much space need the value and how to read it.

Here is a table with the fundamental types used in C++. The most common used are char, float, (signed) int double (float), bool and void.

Check it, and I hope it helps you.

 

Group Type names* Notes on size / precision
Character types char Exactly one byte in size. At least 8 bits.
char16_t Not smaller than char. At least 16 bits.
char32_t Not smaller than char16_t. At least 32 bits.
wchar_t Can represent the largest supported character set.
Integer types (signed) signed char Same size as char. At least 8 bits.
signed short int Not smaller than char. At least 16 bits.
signed int Not smaller than short. At least 16 bits.
signed long int Not smaller than int. At least 32 bits.
signed long long int Not smaller than long. At least 64 bits.
Integer types (unsigned) unsigned char (same size as their signed counterparts)
unsigned short int
unsigned int
unsigned long int
unsigned long long int
Floating-point types float  
double Precision not less than float
long double Precision not less than double
Boolean type bool  
Void type void no storage
Null pointer decltype(nullptr)  

Mastery 16 – Use of “else” with a conditional

Hello everybody!

In this video I will show you how to use conditional else when a parameter in our if is false.
It’s basiclly if (parameter) is true, do something. Else [What means if not], do another thing.

Easy.

Here is the link to my video, you will get it.

Enjoy it!

https://www.dropbox.com/s/34nbykayzf6xkyz/Mastery%2016.mp4?dl=0

Mastery 15 – Use of the conditional “if”

Hello everybody! In this video I show how to use conditional if.

It’s very simple and you will get it fast.

Enjoy it!

https://www.dropbox.com/s/srqvwc0f4tcydu7/Mastery%2015.mp4.ns.mp4?dl=0

Mastery 10 – Basic output (printing) and input (text based) in C++

Hey everybody! This is mastery 10 about cin (input) and cout (output/printing). Importan to remember to write

using namespace std;

to habilitate those commands.

Here is the link to my video. Enjoy it!

https://www.dropbox.com/s/uqikqshfe0avipn/Mastery%2010.mp4?dl=0

Mastery 07 – Use of comments in C++

Hey! In this mastery we are going to learn how to write a comment in our code. The objetive of a comment is to write a text that a user can read but the the computer does not.

Here is the link to the video. Enjoy it!

https://www.dropbox.com/s/zvgdjjbt6cv07p7/Mastery%2007.mp4?dl=0

Mastery 01 – Ability to create C++ file and run from command line

Ok, people. This is a video of how to create a C++ file and run it from terminal. 

Enjoy it.

https://www.dropbox.com/s/tisir8wk52wqzmx/Mastery%2001.mp4?dl=0

About me

In this post I will talk about me .

My name is Juan Pablo Santana. I’m studying Administrative Mechanical Engineering at Tec de Monterrey. I chose to study that degree because I hope when I graduate I can work to develope any Green Energy Machine and help to save the enviroment in that way.

One of my favorite hobbies is read. I loved to read The Count of Monte Cristo from AlexandreDumas.

I have practiced a lot of sports (soccer, basketball, voleyball, tennis, swimming, running), but I can’t choose any favorite.

I love my girlfriend and I hope to learn a lot in this course!

See you 😉

 

On to Functions

Hello everybody!

This week, we are starting to create and use functions. It’s an easier way to solve a problem and write a code in which we are going to use the same function many times. 

One of the important things about creating a funtion is to give the function any variables that you will chang for the integers the user provide. So, doesn’t matter the name of those variables.

Here is the link to my code:

https://www.dropbox.com/s/9ou48pn3y2u3fgk/On%20To%20Functions.cpp?dl=0

Enjoy it!

Sum of numbers

Today’s program make a sum of all the numbers between a lower bound and a higher bound that the users will provide. The trick in all of this code is that we are using five variables to make the summatory, and is very helpfull to use clear variables’ names.

Here is a screenshot of my code and a link to it. Enjoy it!

Sum of numbers.cpp

 

Pick a number

Hey everybody!

This time we learned to use loops, counters and random values. Some of the things that were difficult to me was using a seed for a random value, because we need to write a lot lines only to use the seed. 

You must put attention to the counter, to check if is making a right counting. If not, you could make an off-by-one error.

By the end, this code was interesting to write and I enjoyed writing it. Here is a screenshot of the code and a link to itself.

Pick a number.cpp