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
what is an exception in .net?
Explain About .NET Framework
What is difference between private and static constructor?
In gridview in editmode if we want to display information in one combobox based on
What is .cshtml file?
Can you declare a field readonly?
What is the different types of private assembly and shared assembly?
What is the difference between c and c sharp?
What is the compiler of c#?
What is difference between comparable and comparator?
What is a static class in c#?
What is list array in c#?
Can we instantiate abstract class in c#?
Is list immutable in c#?
What is an example of a delegate?