WSQ03 Fun with numbers (Operators)

Now I´m going to use the operators in C++.

imagenes de matematicas (1)

You have to enter two numbers and the program will calculate:

  • The difference of the two numbers.
  • The product of the two numbers.
  • The integer based division of the two numbers (so no decimal point). First divided by second.
  • The remainder of integer division of the two numbers.

So I started creating the code, it looks like this:

Captura de pantalla 2016-01-22 a las 10.55.55 a.m.

Then, when I run it shows this:

Captura de pantalla 2016-01-22 a las 10.56.30 a.m.

Captura de pantalla 2016-01-22 a las 10.56.30 a.m.

#WSQ01 Get Coding

First we need a code editor, so I chose Atom.

Captura de pantalla 2016-01-15 a las 3.51.15 p.m.

This is how it looks:

Captura de pantalla 2016-01-15 a las 3.51.22 p.m.

Captura de pantalla 2016-01-15 a las 3.51.29 p.m.

Then we need to setup the machine to run the compiler (g++), I used Homebrew to install the packages into the directory.

Captura de pantalla 2016-01-15 a las 3.57.29 p.m.

I copied the code to the terminal and the packages installed.

Captura de pantalla 2016-01-15 a las 3.58.01 p.m.

Also you can use the command-line tool for XCode to set this up.

Once you have already installed the packages your computer is set to compile.

#WSQ01