Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int fatorial, numero;
- printf("Digite um número e te daremos o seu fatorial ");
- scanf("%d", &numero);
- for(fatorial = 1; numero > 1; numero = numero - 1)
- fatorial = fatorial * numero;
- printf("\nFatorial: %d", fatorial);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment