fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int hiperfatorial(int n) {
  5. double ret = 1.0;
  6. do ret *= pow(n, n); while (n-- > 1);
  7. return (int)ret;
  8. }
  9.  
  10. int main(void) {
  11. int n;
  12. printf("\nDigite um numero: ");
  13. scanf("%d", &n);
  14. printf("\nO hiperfatorial desse numero eh: %d", hiperfatorial(n));
  15. }
  16.  
  17. //https://pt.stackoverflow.com/q/255963/101
Success #stdin #stdout 0s 9432KB
stdin
5
stdout
Digite um numero: 
O hiperfatorial desse numero eh: 86400000