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

Prepare .net twain application, Prepare .NET TWAIN application to control d...

Prepare .NET TWAIN application to control digital imaging sensor Project Description: We are seeking somebody to create a .NET TWAIN application which will activate a digital

Gmail, how make the google sign up page?

how make the google sign up page?

Advantages of using uml, What are advantages of using UML? As the name ...

What are advantages of using UML? As the name suggests the UNIFIED MODELING LANGUAGE, The Modeling has been around for years, not only in the software field but also in other t

How different are interface and abstract class in .net, How different are i...

How different are interface and abstract class in .Net? Abstract classes cannot be instantiated it can have or cannot have abstract method basically called as must inherit as t

Class in dot net, What is a Class in dot Net? The class describes all t...

What is a Class in dot Net? The class describes all the attributes of objects, as well as the methods which implement the behavior of member objects. It is a comprehensive data

I need asp.net developer, I am seeking asp.net developers, and will raise d...

I am seeking asp.net developers, and will raise depends on skills and work, we are a web development firm in mexico and i want full time developers that can focus 100 percent my pr

Explain Add References Dialog Box, What is the difference between "using Sy...

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"? When you compiles a program using command line, u add th

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