Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int fatorial(int *n){
- if ((*n==1) || (*n==0)) return 1;
- else return fatorial(*n-1)*n;
- }
- int main(){
- int n = 5;
- printf("%dn",fatorial (&n));
- }
- else return fatorial(*n-1)*n;
- [Warning] passing argument 1 of 'fatorial' makes pointer from integer without a cast
- [Note] expected 'int *' but argument is of type 'int'
- [Error] invalid operands to binary * (have 'int' and 'int *')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement