Quiz Week 6: Multiple exercises in an only quiz

--Originally published at Let's CODE

The quiz for today consited in five exercises that we had to do during the class, which came from a page called C/C++ PROGRAMMING EXERCISES (they were the first five ones). In the first problem, we had to modify a determinated code to make it work. The original code was: #include main() { /* PROGRAM … Continue reading Quiz Week 6: Multiple exercises in an only quiz

Homework 5: Calculator

--Originally published at Let's CODE

This program will make some basic operations. It’s just like the program of the first homework, but using functions. We have to create 5 functions: sum, subtraction, multiplication, division and remainder. Each function must read two integer parameters (the same for each one) given for the user. Also, we have to declare another variable which … Continue reading Homework 5: Calculator

Homework 4: Sum of Numbers

--Originally published at Let's CODE

This program sums a range of consecutive numbers, between a given range by the user. It’s very simple to make, I will show you step by step how to make it. As usual, you need to call the necessary libraries and open the main function. We have to declare two variables for the bounds, one … Continue reading Homework 4: Sum of Numbers

Homework 3: Pick a number

--Originally published at Let's CODE

I have to say that this task is a little more complicated than the previous exercises, because it was necessary to use a special function to generate numbers randomly. This program was thought as a game, where the user have to guess a random number. I decided to give the user only five chances to … Continue reading Homework 3: Pick a number

Homework 2: Temperature

--Originally published at Let'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

Homework 1: Fun with numbers

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

Our first assigment was to make a program that asked the user for two numbers and then showed the sum, difference, product, integer quotient and remainder of that numbers. The code I made is very simple, I just included an additional library (<math.h>) to use the fabs function whe dividing the numbers, because the instructions … Continue reading Homework 1: Fun with numbers

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!!!