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 / shanker

int numberfactorial(int number)
{
if (number == 1) {
return number;
}
else {
return number * numberfactorial(number - 1);
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between first and firstordefault?

903


if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.

2394


Difference between debug.write and trace.write?

958


How does yield return work c#?

929


What is difference between for and foreach in c#?

964


What is the c# equivalent of c++ catch (...), Which was a catch-all statement for any possible exception?

994


Can we override interface method?

964


What is a lambda expression in c#?

1509


How to parse a date time string?

998


Is array a list?

869


What is response redirect in c#?

896


Is it possible to force garbage collector to run?

889


What is sql transaction in c#?

889


Can c# inherit multiple classes?

941


Is null in c#?

866