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

Explain concurrency with aop?

701


Can a class have multiple constructors c#?

641


What is double c#?

705


What is the difference between an integer and int?

649


how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.

1462






What is a web service in c#?

748


What are strong name assemblies?

727


What is ilasm.exe used for?

663


What is a static property. Give an example?

672


What is trim in c#?

736


What are the types of constructors?

668


What is property c#?

679


What are get and set in c#?

735


Is list passed by reference c#?

650


Is string nullable in c#?

654