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 default class in c#?
Are there functions in c#?
What is disconnected data architecture in c#?
What does char mean in c#?
How many types of interface are there in c#?
What does do in c#?
How long has c# been around?
Where are value types stored in c#?
What is an enumerator in c#?
What is a byte in c#?
What is string class in c#?
What is tryparse c#?
How does array sort work?
What are the types in c#?
What are modifiers in c#?