Answer Posted / diana cheriyan
Using System;
Namespace FactNmspce
{
Class FactCls
{
Public Static Void Main(String[]args)
{
int i,n,fact=1;
Console.WriteLine("Enter Number");
n=int.Parse(Console.ReadLine());
for(i=1;i<=n;i++)
{
fact=fact*i;
}
Console.WriteLine("Factorial is {0}",fact);
}
}
}
| Is This Answer Correct ? | 12 Yes | 5 No |
Post New Answer View All Answers
How do you concatenate in c#?
What is a dimensional array?
What do you know about Translate Accelerator?
Can we use "this" command within a static method?
What is the purpose of dictionary in c#?
Is arraylist generic in c#?
How are delegates chosen?
Distinguish between the Debug class and Trace class with its functionality?
Can you store strings in arrays?
Explain About namespaces
What is string pool in c#?
Explain how obfuscator works in .net
What is datatable and dataset in c#?
Why is c# a good programming language?
What is the difference between abstraction and encapsulation in c#?