0
CĂLCULO DE FATORIAL E VARIAVEIS
Em um programa simples para cĂĄlculo de fatorial de um nĂșmero n, usei como retorno para esta função uma variĂĄvel "unsigned long long int", de 64 bits. Mesmo assim, nĂŁo Ă© possĂvel calcular fatoriais para nĂșmero maiores que 20. Como proceder quando preciso de variĂĄveis ainda maiores? https://code.sololearn.com/ck72MjJ3yTp3/?ref=app
4 Answers
+ 8
Full translation (Google Translate)
FACTOR AND VARIABLE CALCULATION
In a simple program for factorial calculation of a number n, I used as a return for this function an "unsigned long long int" variable, 64 bits. Even so, it is not possible to calculate factorials for numbers greater than 20.
How do I proceed when I need even bigger variables?
+ 2
thank you
+ 1
this is a good one. how can get in c++ factorials up to 20/30? I don't know the answer myself. is it the playground?