Calculadora Factorial

--Originally published at RON

En lo personal me pareció la práctica mas retadora, pues no comprendía en absoluto lo que me pedía pero tras investigar algunos conceptos como factorial, y al revisar blogs de mis compañeros, logre realizar esta practica. Deja los blog consultados y mi enlace .cpp abajo.

Blogs de apoyo:

https://brendascode.wordpress.com/2017/09/13/wsq06-factorial-calculator/

https://blogdeesteban.000webhostapp.com/2017/09/homework-06

Haga click para ver el pase de diapositivas.

Enlace código .cpp:

https://drive.google.com/a/itesm.mx/file/d/0BwFGq6oJuVvVUkw5b09IanZLRFU/view?usp=sharing


WSQ06 – Factorial Calculator

--Originally published at BRENDA

I completed the task of making a program that calculates the factorial of a number.

I learnt the Mastery Topic #13 & #16, do while loops and recursions.

I created a function called factorial that used a recursion to repeat the same operation several times. This is my function:

int factorial (int n){
int answer;
answer=1;
while (n>1){
answer = answer * n;
n=n-1;
}
return answer;
}

I did a do-while loop to keep asking the user if they would like the program to calculate a factorial of a number again.

For this assignment I learnt what an unsigned integer is, as well as a char

Captura3

 


Factorial Calculator (WSQ06)

--Originally published at TC1017 (Python3) – Titel der Website

Hello Guys,

 

the WSQ06 was for me, until now, the hardest program to write. The most time I lost with thinking about the program-structure. Like Ken once told us: „Sometimes it is better to delete all your coding and start from the beginning“.

Although it was an overcoming for me I had to do 2 times a Reengineering.

The second thing was the way to count the Factorial. Since now I did the Factorial always with the Calculator and never thought about how the calculator would be programmed to get the result of the Factorial.

Nevertheless, I found a good way to program the Factorial.

My Source-Code:

WSQ06 - SourceCode - Fak.PNG

My result:

WSQ06 - Ergebnis - Fak.PNG

 

If you have a question, just ask me.

I am going to try to help you Guys.

 

Enjoy.

 


Homework 06

--Originally published at Blog de Esteban

Esta tarea ha sido la más difícil hasta ahora, sobre todo porque aprendí a usar un tema nuevo, que al principio si me sacó mucho de onda pero después de una media hora de analizarlo logré entenderlo, este tema es “recursion” y me costó tanto que haré una publicación sobre este tema para explicarlo como a mi me hubiera gustado que me explicaran.

Bueno esta tarea era hacer un código para sacar números factoriales, al principio lo hice con un loop for en el código, pero al mostrarle el código a Ken me dijo que mejor hiciera una función, así que lo volví a comenzar y ahí descubri el mundo de “Recursion”, una clase entera la dedique a hacer este programa y entender el tema , al final funcionó y aprendí un nuevo tema.

link de descarga: https://www.dropbox.com/s/423hubg6flv3qe7/Tarea6.cpp?dl=0