# WSQ02 – Temperature (fahrenheit to celsius).

--Originally published at |Blogging through my thoughts|

**Updated post**

Hello friends !

For this task , my classmates and I were instructed to create a program that will prompt the user for a temperature in Fahrenheit and them convert it to Celsius. The formula that made the conversion possible was  C = 5 ∗ (F − 32)/9  (where F = Fahrenheit).

The resources that helped me were:
-cpluplus.com
-How to think like a computer scientist.

-Water boils at x temperature.

-Water is in its solid state, ice.

-Water, in its solid state, becomes liquid due to its melting point.

-Water does not boil at this temperature.

It was a fun and entertaining task.   # My first C++ program , using Atom and Ubuntu bash on Windows.

--Originally published at |Blogging through my thoughts|

**Updated post**

Hello! curious readers. “Fun with numbers” is the first problem that Professor Ken Bauer assigned us.  The task was to create a program that complies with the points shown in the image and thereby solve the problem.

The language is simple to understand once you study a little. The book “How to think like a computer scientist” was very useful to conceive my code, in addition to several videos of youtube.

I hope you like program and really understand the whole code Luis Felipe Garate Moreno.  # “Hello world – Hola mundo” // Using Atom from GitHub and Ubuntu bash on Windows.

--Originally published at |Blogging through my thoughts|

Welcome! , curious readers. This is my first post of the semester but it´s not my first approach to programming. For some health causes I had to take some months to take care of myself , but now I´m back and going to be publishing a lot of atom programs.

In this post I only show the simple code to output “Hello world” . It´s a great first example of what you can do with C++.

See you soon   # #WSQ10

--Originally published at May The Code be With You

Today, we are going to calculate a square root using an unconventional method, the Babylonian Method.

You may ask “What the heck is a Babylonian?!”. Well, Babylonials were an ancient culture who gave a lot to our math knowloge, by creating methods like this to calculate certain things.

This particuliar method consist in cutting a rectangle until it gives you the closest number to a square. Of course we are not cutting anything, we will just follow the formula.

So, the formula basically says “Take the number you want to know its square root, add the closest perfect square number to it. And divide all that by the square root of the perfect square number multiplied by two” I know it may sound a little complicated, but here is a video to explain it in a simplier way: https://www.youtube.com/watch?v=sFMK3v879kg As a human, you have a natural sense of comparission between number, so in that way you can know which perfect square number to use, but in your program you will have to make a for loop and increase the number and multiply it by itself in order to get the closest one, simple.   # Quiz_8

--Originally published at May The Code be With You

This time I´ll teach you how to get through quiz#8.

The main topic of this quiz is the Fibonacci Series. A special serie where the two previous numbers summatory gives you the next number. You can see it here:

http://www.disfrutalasmatematicas.com/numeros/fibonacci-sucesion.html

Knowing this is quite simple how to do it. As you can see, since the series starts with 0, if the user ask you for the first term, you will have to return 0, and also for the second and third term you will have to use ifs in order to return “1”.

And for any other term just use the formula.

Simple   # Expo Ingenierías

--Originally published at prgrm.co

So I went to Expo Ingenieria and I felt motivated. People my age are making some amazing things, so I felt the need to do something amazing. I tried to make an engine that would spin at different speeds but I couldn’t make it work. But seeing all of what my classmates are doing made me realize I want to be doing cool things as well. I saw a 3d prosthesis and a lot of robotic arms.  # Use of diferent Functions

--Originally published at how not to program

Here is a code showing diferent functions

#include <iostream>
using namespace std;

int num1, num2, res, dif, mul;
float div;
int resta(int a, int b)
{
dif = a – b;
return (dif);
}
int mult(int a, int b)
{
mul = a * b;
return (mul);
}
int residuo(int a, int b)
{
res = a % b;
return (res);
}
float division(int a, int b)
{
div = a / b;
return (div);
}

int main(){
cout << “Introduce dos numeros. ” << endl;
cin >> num1 >> num2;
cout << “La resta es: ” << resta(num1,num2) << endl;
cout << “La multiplicacion es: ” << mult(num1,num2) << endl;
cout << “El residuo es: ” << residuo(num1,num2) << endl;
cout << “La division es: ” << division(num1,num2) << endl;
return 0;
}  # Guess the code

--Originally published at how not to program

Here is an other guess the code, guess what the code do in the comments

#include <iostream>
#include <string>
using std::string;
using std::cout;
using std::cin;
using std::endl;

int main(){
string palabra, alreves, respuesta;
cout << “Dame la palabra ” << endl;
cin >> palabra;

// cout << palabra;

int tamano = palabra.length();
for(int i = tamano-1; i>=0; i–){
// cout << palabra[i];
alreves = alreves + palabra[i];
}
cout << alreves << endl;
if(palabra == alreves)
{
cout << “Es palindromo ” << endl;
}
else
{
cout << “No es palindromo ” << endl;
}
}  # Ted talk video about coding

--Originally published at how not to program

Here is a nice video i thought you would like  # Guess the code

--Originally published at how not to program

Here is a new code, guess what it does

#include <iostream>

using namespace std;

int a , b, c, d;

int main()
{
cout << “escribe un numero” << endl;
cin >> a;
cout << “escribe otro numero” << endl;
cin >> b;
cout << “escribe otro numero” << endl;
cin >> c;
cout << “escribe otro numero” << endl;
cin >> d;
if (a>b){

if (a>c)
{
if (a>d){

cout << “El primer numero es mas grande que todos ” << endl;
}
}
}
else {

cout << ” mejor me mato ” << endl;
}
return 0;
}  