Find out the factorial - c# program, DOT NET Programming

Assignment Help:

Find out the Factorial - C# Program

I've been trying so many codes for this but those codes didn't work well. Please write the code for find out the factorial of an integer number in C#.


Related Discussions:- Find out the factorial - c# program

Benefits & limitation of hidden fields, What are benefits & Limitation of  ...

What are benefits & Limitation of  Hidden fields? The benefits of using Hidden fields are as shown below :- 1)    They are very simple to implement. 2)    As the data is

Asp .net facebook app project completion, Project Description: We are a ...

Project Description: We are a small development house in Singapore, and have a project which is 90 percent complete; thud our previous developer could not finish due to other co

Write the basic syntax of a linq query in visual basic, Write the basic syn...

Write the basic syntax of a LINQ query in Visual Basic as well as in C#. In Visual Basic, the basic syntax of a LINQ query begins with the from clause and ends with the Select

How to access attributes using "xmlreader", How do we access attributes usi...

How do we access attributes using "XmlReader"? The below snippets represents the way to access attributes. At First in order to check whether there any attributes present in th

Need help in fixing chrome problem, Fixing chrome problem Problem 1- Boo...

Fixing chrome problem Problem 1- Booksearcha.asp and bookrstep2.asp on allreaders.com (bookrstep2 only accessible from bookrstep1.asp) utilize scroll down menus at times. In Chr

Costing, how much guys cost for small 5 pages website designing in .net?

how much guys cost for small 5 pages website designing in .net?

What are the components of wf 4.0, What are the components of WF 4.0? W...

What are the components of WF 4.0? WF having of various components that work together to make desired workflow. The components of WF are given as follows: Workflows and a

Web service, What is a Web Service? The Web Services are the business l...

What is a Web Service? The Web Services are the business logic components which provide the functionality via the Internet using standard protocols like HTTP. The Web Servic

Namespace in which .net have the data functionality classes, What is the na...

What is the namespace in which .NET have the data functionality classes? System.data : This namespace contains the basic objects used for accessing &  storing relational d

Jermy

2/11/2013 11:50:30 PM

Try this code, it will help you.

Program of Finding Factorial

using System;  

class Factorial

{

  public static void Main()

 {

   int no,i,fact=1;

  Console.Write("Enter a number to find its factorial : ");

  no = int.Parse(Console.ReadLine());   

   if (no != 0)

  {

    for (i = no; i>=1; i--)

   {

    fact = fact * i;    

   }

   Console.WriteLine("Factorial = " +fact);

  }

   else

  {

   Console.WriteLine("You entered 0, not valid.");

  }  

  Console.ReadLine();

 }

}

Stephen

2/11/2013 11:51:03 PM

Thank you for this code i really works well, you are doing great job.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd