fatorial

Best algorithm for calculating factorial

So, I'm learning to develop in Java. The professor asked me to develop a method for the factorial. And also show on the scree ... io inserir o número) 6 -> lblFat (local que gera o resultado) Factorial in Java, do you have a better way to write code?

need help to calculate the factorial in ascending and descending order in an equation!

I need to solve this question: Make a program that reads the number of terms and a positive value for X. calculate and show ... um; for (int i = (num-1); i > 1; i--) { resultado = resultado * i; } return resultado; } Thanks for the help!

Factorial from 0 to 20 using For

I need to do the following exercise: "Using the For loop, calculate and print on screen the factorial of all numbers between ... fat = fat * cf; acc = acc + fat; } } printf("%d! = %.1lf\n",cc+1 , fat); } }

Python program that takes the factorial from odd numbers to the one typed by the user

I should ask the user to type an odd number and return on the screen the sum of the factorial of all the odd ones up to the o ... ")) while a<0: a=int(input("Número menor que zero, digite outro número: ")) else: b=fatorial(a) print(b)