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

Can abstract class have private constructor c#?

510


Is java better than c#?

516


What is the difference between icomparer and icomparable in c#?

467


Can an exception be thrown from a catch block?

572


What is default constructor in c#?

503






What is routing in c#?

464


Can a method be sealed in c#?

493


What is Fragmentation and its Types?

569


What is part of a method signature in c#?

469


List the fundamental oop concepts?

523


What is multithreading? What are the problems that comes with multithreading and how to manage them?

553


How do you name a variable in c#?

505


What does m mean in decimal c#?

498


What is a multicast c# delegate?

515


What is console write in c#?

497