Last active
August 29, 2015 14:13
-
-
Save joffilyfe/7a81ba3c70b599334c0c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int fazFatorial(int numero); | |
int main(void) { | |
int numero; | |
scanf("%d", &numero); | |
printf("%d\n", fazFatorial(numero)); | |
return 0; | |
} | |
int fazFatorial(int numero) { | |
int i = 0; | |
for (i = numero; i > 1; i--) { | |
numero *= i - 1; | |
} | |
return numero; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment