Author Archives: Juan Carlos

#Mastery20

Here is a link to my video explaining the which is me explaining how to use the FOR loop.

Hope you enjoy it and learn from it!

https://www.youtube.com/watch?v=kY5XWdtqI5Y

#Mastery09

Here is a link to my video o me explaining the .

https://www.youtube.com/watch?v=mmJlXwpQC88

#WSQ08

Here is my , here i´m showing the same program as in but this time i wrote function for each calculation.

#WSQ07

Here is my which is about a prgram that sum the numbers in a given range, for example from 1 to 4 will sum, 1+2+3+4=10.

Here is my source code and the program running.

Enjoy!

#Mastery19

I´m going to explain you the , which is the do, while mastery. When you want to do a loop with do while there is one thing you have to understand, ther will be one condition and the program will work until that condition is true. Because sometimes people think the other way around, they think that the program have to work until the condition be false and that´s not right.

Knowing this let´s get started.

First you have to put the word “do” and open keys “{}”, inside the keys you will put whatever program you want and at the end after the key you have to put “while” and between parenthesis you have to put the condition you want the program to work until it is true.

After the while you can put an output message or continue with your program.

Here is an example, enjoy!

#Mastery16

This is where i show you how to use the conditional else.

Once you put your conditional if then you put else, open keys “{}” and in there you put what you want the program do if the condition in if is false.

Here´s an example, Enjoy!

#Mastery15

Here im going to teach you how to put a conditional in c++.

Is really simple all you have to do is put “if(the condition)” then open keys “{ The instruction if the condition is true}.

That´s pretty much it.

Enjoy! And here is an example which make it easier to understand.

#Mastery13

Here i will show you how to put libraries in c++, which is .

Is really simple you just have to put at the beginning of the code hashtag “include” and between this <> the name of the library. Like this “#include <(name of the library)>” and that´s it.

Here is an example.

Enjoy!

#Mastery10

This is a post where i will show you  the which is how to put a basic output and input.

To do an output you just put “cout<< (Whatever you want to print between quotes) (if you want to print a variable put the variable between this “<<” and then put a semi colon “;”.

To do an input you will have to declare a variable, lets say the variable is called “num”, once you have your variable you do this “cin>> num;” and that´s all now you saved whatever you asked the user to give.

Here is an example to make it easier

Enjoy!

#Mastery07

Here I will teach you how to put notes in your source code.

It is very simple, all you have to do is to put two slashes like this “//” and then write your comment, like this “// Heres is my comment”.

I hope you learn from this and here is a screenshot of an example to make it easier.

Thanks for reading!