Answer Posted / dharmendra nonia
using System;
class Factorial
{
public static void accept()
{
double a;
Console.WriteLine("Enter ur Number:");
a=Double.Parse(Console.ReadLine());
double res=fac(a);
Console.WriteLine(res);
}
public static double fac(double d)
{
if (d == 1)
return 1;
else
return d * fac(d - 1);
}
public static void Main()
{
accept();
Console.Read();
}
}
| Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Explain the term inheritance in C#.
What is mean by c#?
Can a loop recorder detect a heart attack?
Which is faster iqueryable or ienumerable?
How to add a readonly property in c#.net
What is hierarchical inheritance in c#?
What is ado c#?
What are methods c#?
What is access modifier in c#?
What are the types of delegates in c#?
What is difference between class and abstract class in c#?
Which class does the remote object has to inherit?
how background thread access to ui control?
What is a clr (common language runtime)?
What is void method?