Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write code for Factorial?

Answer Posted / dilip tekedil

public long Factorial(short num)
{
if (num == 1) return (long)1;
return num * Factorial(--num);
}

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we set the class to be inherited, but prevent the method from being over-ridden?

938


Is enum a class c#?

836


What is check/uncheck?

1144


what is the syntax to inherit from a class in c#?

976


How do you clear a list in c#?

867


Explain the clr triggers?

911


What is extension method in c# and how to use them?

892


Why can’t struct be used instead of class for storing entity?

913


Can you use foreach iteration on arrays in c#?

1024


How many keyword present in C# language ?

958


Why use a singleton instead of static methods?

856


How do you pass reference parameters in c#?

876


what is the difference between .dll and .exe

989


Why are strings immutable c#?

880


Why is it efficient to use System.string under System.Text.StringBuilder ?

951