in c this program will be like this u may change this program in c++:-
int facto(int );
#include<stdio.h>
main()
{
int n,fact;

printf("\nenter the number for which you want to find the factorial");
scanf("%d",&n);
fact=facto(n);
printf("\nthe factorial of yhe number %d is %d",n,fact);getch();
}
int facto(int n)
{

if(n==1)
return(1);
else
n= n*facto(n-1);
return n;
}


On Wed, Aug 3, 2011 at 1:49 PM, mandy <[email protected]> wrote:

> Can anyone tell me how to compute factorial of 50 in c++ and even for
> bigger no.
> I am getting error(a default value)
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-codejam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-code?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-codejam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to