Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- int i,j,number,cycle,fat = 1;
- printf("Entre com o numero de valores a serem lidos :\n");
- scanf("%d",&cycle);
- for (i = 0; i < cycle; i++)
- {
- printf("Entre com um valor inteiro e positivo :\n");
- scanf("%d",&number);
- for (j = number; j > 0; j--)
- {
- fat = fat*j;
- }
- printf("VALOR = %d\nFATORIAL = %d\n",number,fat);
- fat = 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment