In this tutorial, I am going to write a program for how to find Factorial of Given Number in C#.

## After completing this tutorial you will understand:

• How to find Factorial of a given number in C#.

## How to find Factorial of a Given Number in C#?

Open Visual Studio and Create a Console Application in C# called FactorialNumberDemo.

Open Program.cs file and write the following code.

```using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FactorialNumberDemo
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter a number");
long lFact = GetFactorial(iNumber);
Console.WriteLine("{0} factorial is {1}", iNumber, lFact);
}
private static long GetFactorial(int iNumber)
{
if (iNumber == 0)
{
return 1;
}
return iNumber * GetFactorial(iNumber - 1);
}
}
}```

Run the application and look over the output window.

### Conclusion:

Hope you understand how to find Factorial of a given number in C#. Your valuable comments, Suggestions and Feedbacks are always welcome.

Thank You.

### Explore post tags

• Hi would you mind sharing which blog platform you’re using? I’m looking to start my own blog in the near future but I’m having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique. P.S My apologies for getting off-topic but I had to ask!|

• Hi, i think that i saw you visited my site thus i came to “return the choose”.I’m attempting to find issues to enhance my site!I guess its adequate to make use of a few of your ideas!!

• Well I truly enjoyed studying it. This tip offered by you is very practical for good planning.

• This is a topic that’s near to my heart… Cheers! Exactly where are your contact details though?|

• Simply desire to say your article is as astonishing. The clarity for your post is just cool and that i could suppose you’re a professional in this subject. Well with your permission let me to snatch your RSS feed to keep updated with imminent post. Thank you 1,000,000 and please carry on the gratifying work.

• We’re a group of volunteers and starting a new scheme in our community. Your site offered us with valuable information to work on. You have done an impressive job and our entire community will be grateful to you.

• Nice post. I learn something totally new and challenging on sites I stumbleupon on a daily basis. It will always be helpful to read cara bermain game kasino content from other authors and practice a little something from their web sites.

• Hi there, I found your web site via Google while searching for a related topic, your site came up, it looks great. I’ve bookmarked it in my google bookmarks.

• Simply want to say your article is as surprising. The clearness for your submit is simply cool and i can think you’re an expert in this subject. Fine along with your permission let me to seize your feed to stay updated with drawing close post. Thanks one million and please keep up the rewarding work.

• Thanks a lot for sharing this with all of us you actually know what you’re talking about! Bookmarked. Please also visit my website =). We could have a link exchange arrangement between us!

• Wow, marvelous weblog layout! How long have you ever been blogging for? you made blogging look easy. The entire glance of your website is great, let alone the content!

• Spot on with this write-up, I honestly believe this website needs far more attention. jenis permainan togel I’ll probably be back again to see more, thanks for the info!

• I simply want to say I am very new to blogging and site-building and certainly enjoyed this website. More than likely Iâ€™m likely to bookmark your website . You amazingly have perfect articles. Regards for revealing your blog site.

• This is a really good site post, Iâ€™m delighted I came across it. Iâ€™ll be back down the track to check out other posts that

• I like what you guys are up too. Such intelligent work and reporting! Carry on the excellent works guys I have incorporated you guys to my blogroll. I think it will improve the value of my web site ðŸ™‚

• Wow! This can be one particular of the most useful blogs Weâ€™ve ever arrive across on this subject. Basically Wonderful. Iâ€™m also an expert in this topic therefore I can understand your effort.

• As a Newbie, I am continuously exploring online for articles that can aid me. Thank you

• quite interesting article. however, in some cases it still needs improvement.

• Wow! This can be one particular of the most useful blogs Weâ€™ve ever arrive across on this subject. Basically Wonderful. Iâ€™m also an expert in this topic therefore I can understand your effort.

• Good day! I just want to give a huge thumbs up for the great data you may have here on this post. I will probably be coming back to your blog for more soon.

• I will right away take hold of your rss as I can not find your e-mail subscription hyperlink or newsletter service. Do you’ve any? Kindly let me know so that I may subscribe. Thanks.

• quite interesting article. however, in some cases it still needs improvement.

• Heya i’m for the primary time here. I came across this board and I to find It really helpful & it helped me out a lot. I hope to offer something again and help others like you helped me.

• My coder is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using WordPress on a variety of websites for about a year and am concerned about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can transfer all my wordpress content into it? Any help would be greatly appreciated!

• Keep working ,splendid job!

• Thank you, I have just been looking for info approximately this topic for ages and yours is the best I’ve found out till now. However, what concerning the conclusion? Are you certain concerning the source?

• Wunderbar Seite. Eine Menge nï¿½tzlicher Infos hier. Ich werde sie an ein paar Freunde schicken und auch in delicious teilen. Und sicher, danke fï¿½r Ihre Bemï¿½hungen!

• Hi, I believe your website could be having internet browser compatibility problems. Whenever I take a look at your website in Safari, it looks fine however when opening in IE, it has some overlapping issues. I merely wanted to give you a quick heads up! Aside from that, excellent blog!|

• Hi, i feel that i saw you visited my blog so i came to “return the desire”.I’m attempting to find issues to enhance my site!I guess its adequate to use a few of your ideas!!

• quite interesting article. however, in some cases it still needs improvement.

• Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how could we communicate?

• Good day! I just want to give a huge thumbs up for the great data you may have here on this post. I will probably be coming back to your blog for more soon.

• As a Newbie, I am continuously browsing online for articles that can benefit me. Thank you

• May I simply just say what a comfort to discover somebody that really understands daftar akun togel online This web site is something that’s needed on the internet, someone with a bit of originality!

• Usually I do not read post on blogs, but I would like to say that this write-up very forced me to check out and do so! Your writing taste has been amazed me. Thank you, very great post.|

• I’ve been browsing online more than 3 hours nowadays, yet I never discovered any fascinating article like yours. It’s beautiful worth enough for me. In my opinion, if all site owners and bloggers made excellent content material as you did, the internet will likely be a lot more helpful than ever before.

• I am sure this paragraph has touched all the internet viewers, its really really pleasant article on building up new blog.|

• May I just say what a relief to uncover someone who really knows cara main roulette yang menguntungkan This web site is one thing that is required on the web, someone with a bit of originality!

• My programmer is trying to convince me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using WordPress on a number of websites for about a year and am anxious about switching to another platform. I have heard very good things about blogengine.net. Is there a way I can import all my wordpress content into it? Any kind of help would be greatly appreciated!|

• Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.|

• 490401 16223I want reading through and I conceive this site got some genuinely utilitarian stuff on it! . 891034

• I would like to thnkx for the efforts you have put in writing this website. I am hoping the same high-grade site post from you in the upcoming as well. Actually your creative writing abilities has inspired me to get my own site now. Really the blogging is spreading its wings rapidly. Your write up is a great example of it.

• 337715 619028I enjoy this website, will undoubtedly arrive back. Make positive you carry on writing high quality posts. 346597

• whoah this blog is excellent i love reading your posts. Keep up the great work! You know, many people are hunting around for this information, you can help them greatly.

• Extraordinarily motivating suggestions you’ll have said, thank you for publishing.

• Can you win prize on online casinos?
Yes, playing online casino games are legal on Australian players. … When online gambling as a replacement for authentic cash, it is vital to induce a lees into your casino account. The finery online casinos advance their players a deviating option of honourable banking options to accumulation and go back on their legal tender
mobile version
this guy

• Can you get money on online casinos?
Yes, playing online casino games are real chanse as a service to Australian players. … When online gambling in behalf of physical wealth, it is vital to make a entrust into your casino account. The finest online casinos make available their players a deviating flower of reliable banking options to consign and withdraw their legal tender
mobile version
conversational tone

• It’s appropriate time to make a few plans for the future and it is time to be happy. I have read this post and if I may just I want to counsel you some attention-grabbing things or tips. Maybe you can write subsequent articles regarding this article. I want to read even more issues approximately it!|

• You could certainly see your skills within the work you write. The sector hopes for more passionate writers such as you who are not afraid to say how they believe. All the time go after your heart.|