Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int fat, n;
- char d;
- do{
- printf("digite um numero:");
- scanf("%d",&n);
- for(fat = 1; n > 1;n = n - 1){
- fat=fat*n;
- }
- printf("fatorial = %d\n", fat);
- printf("s ou n:?");
- scanf("%s",&d);
- }
- //
- while ( d =='s'|| d =='S');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement