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

Write the difference between TypeOf and GetType?

586


Why we use get set in c#?

494


Can you create sealed abstract class in c#?

481


Which is faster list or dictionary in c#?

569


What is a dynamic assembly?

523






What is verbatim literal in c#?

486


What is the different types of private assembly and shared assembly?

495


What is the data type for bit in c#?

472


What is ilist c#?

497


What operators can be used to cast from one reference type to another without the risk of throwing an exception?

514


Explain what a diffgram, and a good use for one Define diffgram? How it be used?

542


What Is The Difference Between The System.array.copyto() And System.array.clone()?

533


What is private in c#?

485


How do you create dlls in .NET

570


What is difference between encapsulation and abstraction in c#?

454