WSQ02-Temperature

--Originally published at Programming course

The assignment was about asking for a temperature in Fahrenheit and with a formula convert it to Celsius, then tell the user if the water will boil or not.

What I did was to ask for the number, then apply this formula: C = 5 ∗ (F − 32)/9. And finally using an if, tell the user if the water boils or not (Temperature in Celsius>=100 it boils)

wsq02-atom wsq02-terminal

WSQ01- Fun with numbers

--Originally published at Programming course

So the assignment was to ask the player/user (¿?) for two numbers, and our job was to create a program that could sum, substract,multiply, divide and give the remain of the division.

  1. First I asked for the two numbers
  2. Then I declared the variables (Using int for the two numbers, the sum and the substraction and the multiplication and using double for division and remain because they can be numbers with decimals)

And the formulas I used were:

  • sum: a=x+y
  • difference: a=x-y
  • multiplication: a=x*y
  • division: a=x/y
  • remain:x%y

And basically that’s it ?

wsq01-atom wsq01-terminal

Quiz 04

--Originally published at Programming course

So during class I started my code and I thought I was done but the time was over, so as soon as I got home I started compiling my program, but the trouble started. I had many error and the program couldn’t run, so i went line by line trying to figure out what was wrong. At the end I only had one error about a “{” symbol, but if I moved it or delete it, I would have 19 errors, at the end I noticed I had a “;” before that “{” and I could finish.

captura-de-pantalla-2017-02-02-a-las-19-37-38 captura-de-pantalla-2017-02-02-a-las-19-37-53 captura-de-pantalla-2017-02-02-a-las-19-38-00

Hello World?

--Originally published at Programming course

So I had some problems trying to download the tools but I finally did it! So I started with Hello world, and the fist thing I did it was to make a new folder called “Progra” in my Documents, and using my terminal, I told it where my files will be, then using Atom I started typing the code, first declaring the variables and then using the “Hello, world”, the only problem I had, was that my keyboard is programed differently and I couldn’t find this braces {} and I couldn’t run it, so what I did, it was to program again my keyboard in english in order to have this. Then in my terminal i just typed g++ and the name of my file, then ls and finally ./a.out and that was basically it ?  ?

captura-de-pantalla-2017-01-19-a-las-20-20-13captura-de-pantalla-2017-01-19-a-las-20-20-32