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

Difference between factory and abstract factory patterns, What is the diffe...

What is the difference between Factory and Abstract Factory Patterns? The main basic difference between factory and Abstract factory is factory method uses the  inheritance to

Different transaction levels in sql server, What are different transaction ...

What are different transaction levels in SQL SERVER? The Transaction Isolation level decides how is the one process isolated from theother process. Using the transaction levels

Describe the three levels of data abstraction, Describe the three levels of...

Describe the three levels of data abstraction? The are three levels of abstraction: Physical level: The lowest level of abstraction explains how data are stored.  Logical

Application domain, What is an application domain? Previously "PROCESS"...

What is an application domain? Previously "PROCESS" were used as the security boundaries. One of the process has its own virtual memory and does not overlap the  another proces

Black box testing & white box testing, What is black box testing & White bo...

What is black box testing & White box testing? The Black box testing is also termed as functional testing. It ignores how the internal functionality of a system works & depends

What is a class, What is a class? A class describes all the attributes ...

What is a class? A class describes all the attributes of objects, as well as the methods that execute the behaviour of member objects. It is a comprehensive data type, which sh

Program for assigning the values to variables, Normal 0 false ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What is code access security, What is code access security (CAS)? Code ...

What is code access security (CAS)? Code access security (CAS) is part of the .NET security model that stops unauthorized access of resources and operations, and restricts the

Illustrate the basic process in an asp.net architecture, Problem: (a) ...

Problem: (a) (i) Using a diagram, illustrate the basic process in an ASP.NET Architecture involving at least five objects. (ii) List two methods and two collections

Denormalization, What is denormalization? The Denormalization is the pr...

What is denormalization? The Denormalization is the process of putting one fact in numerous places (i.e. the vice-versa of normalization). Only one valid reason exists for deno

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