Proyecto Final: Calculadora de Derivadas e Integrales.

This is a program we made together Eduardo Morales, Eduardo Barrera and me, José Quiroga. I hope you like it:

Programming-Edmo

Hola a todos!

Este post es sobre mi proyecto final de programación en C++, para lo cual mi equipo y yo decidimos crear una calculadora que pueda resolver integrales y derivadas que el usuario elija. Dicho lo anterior, buscamos la creación de un programa que fuera útil para nosotros y para las personas que quieran utilizarlo, creando el programa con fines prácticos para los estudiantes y sin duda alguna muy amigable y fácil de entender para el usuario. Para ello necesitamos aplicar los conocimientos adquiridos a lo largo del curso, a través del uso de funciones, vectores, librerías, entre otros.

Durante la creación de este proyecto nos enfrentamos a muchísimos problemas, ya que necesitamos crear tres diversos programas para la función del original (INTMAIN), donde pedimos todos los valores al usuario para su uso. Cabe destacar que usamos el software de VISUAL STUDIO 2012 para la creación de nuestro programa…

Ver la entrada original 252 palabras más

Quiz 6 Euclides

matemazz39

In this quiz we had to make a program that tells you the greatest common divisor between two integer numbers. So the program asks for the biggest number and then the smallest.

For this we have to use the Euclid’s Algorithm: (Wikipedia obviously)

The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, 21 is the GCD of 252 and 105 (252 = 21 × 12 and 105 = 21 × 5), and the same number 21 is also the GCD of 105 and 147 = 252 − 105. Since this replacement reduces the larger of the two numbers, repeating this process gives successively smaller pairs of numbers until one of the two numbers reaches zero. When that occurs, the other number (the one that is not zero) is the GCD of the original two numbers.

Here is a video, it´s in Spanish but explains this quite good:

Captura de pantalla 2016-04-05 a las 10.01.02 p.m.

Captura de pantalla 2016-04-05 a las 10.01.42 p.m.

Thanks to Baruch who taught me how to make the loop.

thak you

WSQ 10 List of Numbers

In this WSQ I had to create a program that ask for numbers and then show them as a list, the total, average and standard deviation of them.

So I used a for loop with a array to ask for the numbers, the array was the quantity of numbers I would like to use for that program, so I could modify it for whatever I want to.

Then, I created the functions Total, Average and Std. Dev., the Total function could be used for the Average and the Average could be used for the Standard Deviation.

Captura de pantalla 2016-04-05 a las 8.38.21 p.m.

When it runs looks like this:

Captura de pantalla 2016-04-05 a las 8.38.44 p.m.

As you can see, this is an “easy” program but you have to make it easy to write, using functions, loops and arrays.

BRkj4jM_700wa_0

TC101

WSQ10

Quiz 3

Now we have the Quiz number 3.

In this quiz, first we have to create a program that calculates the distance between two point in a graph using the coordinates (X, Y).

The user has to introduce the two points (X1, Y1) and (X2, Y2).

Captura de pantalla 2016-02-12 a las 10.49.21 a.m.Captura de pantalla 2016-02-12 a las 10.49.44 a.m.

In the second program we have to do the Fibonacci sequence using just one input.

The Fibonacci sequence are the numbers in the following integer sequence.

0, 1, 1, 2, 3, 5, 8, 13, 21, …

By definition, the first two numbers in the Fibonacci sequence are either 1 and 1, or 0 and 1, depending on the chosen starting point of the sequence, and each subsequent number is the sum of the previous two.

Captura de pantalla 2016-02-14 a las 5.51.40 p.m.

Also, the program ask the user if he wants another number of the sequence.

Captura de pantalla 2016-02-14 a las 5.52.20 p.m.

PRoPBdo_700wa_0

TC101

Quiz 3

WSQ09 Factorial

In this program we have to make a loop in which we find the factorial number of the one ingress by the user. Then we have to ask if he wants to ingress another number to calculate the factorial.

The factorial function (symbol: !) means to multiply a series of descending natural numbers. Example:

  • 4! = 4 × 3 × 2 × 1 = 24

I´m going to use a For loop to make the factorial inside a Do-While loop to ask if he wants another number.

Captura de pantalla 2016-02-12 a las 9.44.23 a.m.

Captura de pantalla 2016-02-12 a las 9.44.43 a.m.

The code will be here at GitHub

Greetings!

BRk4Gd2_700wa_0

 

TC101

WSQ09

WSQ08 Functions

The functions allow to structure programs in segments of code to perform individual tasks.

In this program I´m going to do the same as in the WSQ03, but using functions.

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.

 

Captura de pantalla 2016-02-09 a las 11.05.07 a.m.Captura de pantalla 2016-02-09 a las 11.05.10 a.m.Captura de pantalla 2016-02-09 a las 11.05.23 a.m.

I will leave the code on GitHub, here is the link.

3dBOlpw_700wa_0

TC101

WSQ08

 

QUIZ 2

In this Quiz we just had 2 exercises:

In the first exercise we had to ask for two numbers (a, b) and show the result of growing the first one to the second one. Example: (a=5, b=2) R=25
We could do this with the function Pow including the <math.h> library, or we can do it with the function For. I did it with Pow:

Captura de pantalla 2016-02-05 a las 10.54.38 a.m.Captura de pantalla 2016-02-05 a las 10.54.48 a.m.

In the second exercise we had to show the number of stars that we ingress. Example: cin=5 R=*****

Captura de pantalla 2016-02-05 a las 11.04.04 a.m.Captura de pantalla 2016-02-05 a las 11.04.16 a.m.

TC101

QUIZ

Wdnj5Vd_700wa_0

 

Quiz (C++)

Quiz_button

The past class we have a quiz. It wasn´t that hard, in fact for me it was very easy.

The quiz consisted of 3 programs.

The first program calculates the volume of a cylinder, you just have to ingress the radio and the height.

Captura de pantalla 2016-02-02 a las 10.32.16 a.m.

Once you enter the data the program makes the calcule and tells you the volume.

Captura de pantalla 2016-02-02 a las 10.32.31 a.m.

 

Then we have to make a program that calculates the product, integer and remainder of two numbers using int variables. It´s like the WSQ03.

Captura de pantalla 2016-02-02 a las 10.32.43 a.m.

Captura de pantalla 2016-02-02 a las 10.32.56 a.m.

The last program is almost the same but using float variables, adding the sume and  difference of the numbers, and taking away the remainder.

Captura de pantalla 2016-02-02 a las 10.34.07 a.m.

Captura de pantalla 2016-02-02 a las 10.34.21 a.m.

Once we finished the quiz we had to send it to our teacher.

Here is one of my friends post about this quiz.

TC101

QUIZ