Homework 9: Multipart data and files

--Originally published at Let's CODE

In this asingment we are going to read a text file and count the number of both lines and characters present on the document. We need to use the libraries #include <iostream> and #include <fstream> to be able to use the functions that open and read text documents. This is my code. #include <iostream> #include … Continue reading Homework 9: Multipart data and files

Homework 10: Babylonian Method

--Originally published at Let&#039;s CODE

This function will calculate a square root through the Babylonian Method. First of all, I would like to explain how the method works. You have to establish a first number that is “aproximate” to the real squareroot, doesn’t matter if that number is equal to one, because we are going to make some mathematical operations. … Continue reading Homework 10: Babylonian Method

Quiz Week 4: The minimum value and sum of squares

--Originally published at Let&#039;s CODE

I utilized two functions to do this program, one is in charge of comparing two values and then keep the minor of both, to campare it again with any other value. The other function calculate the sum of the square of given values. After stablish that, I proceeded to ask the user for the quantity … Continue reading Quiz Week 4: The minimum value and sum of squares

Homework 2: Temperature

--Originally published at Let&#039;s CODE

Now our task was to biuld a program that convert the temperature mesures from Fahrenheit to Celsius degrees, and at the same time indicate if the water boils at the given temperature. It was necessary a few calculations, cout commands and some conditionals to make it work, being this the result: #include <iostream> using namespace … Continue reading Homework 2: Temperature

Hello World!!!

--Originally published at Let&#039;s CODE

This is the first program I make with C++. It is very simple, and it’s like the “Ritual of Iniciation” in the programming world. You only have to understand simple concepts to make it happen. For example, to print or read informatio during the execution of the program, you need to write the line #include … Continue reading Hello World!!!