TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bhavna Chaudhri
NA
529
21.1k
calculate factorial error.
Dec 1 2020 8:19 AM
what is wrong with my factorial code , it gives 0 output?
public
static
void
Main()
{
Console.WriteLine(Factorial(100));
Console.ReadLine();
}
public
static
int
Factorial(
int
num)
{
int
fact = 1;
for
(
int
i = num; i > 1; i--)
{
fact = fact * i;
}
return
fact;
}
Reply
Answers (
2
)
How to remove validation message,
post data to MVC Controller from view using Ajax.