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 "web farms" and "web garden", What is the difference bet...

What is the difference between "Web farms" and "Web garden"? The "Web farms" are used to have some redundancy to reduce the failures. It consists of two or more web server of t

Windows 8.1 project - asset management slate app, I need Windows 8.1 Projec...

I need Windows 8.1 Project, Asset management slate App Project Description: We are seeking a Windows 8 app developer with PROVABLE experience to prepare a project and asset m

Use of connection object, What is the use of connection object? The con...

What is the use of connection object? The connection objects are used to connect a data to the Command object. 1)An OleDbConnection object is used with the  OLE-DB provider

Immediate need in website update, Website update... Immediate need I wan...

Website update... Immediate need I want someone experienced in ASP.NET who can set up PayPal on my website by Feb. 1st. I would similarly like to have some changes made in the t

What are major difference between classic ado and ado.net, What are major d...

What are major difference between classic ADO and ADO.NET? Following are some major differences among both In ADO we have recordset and in ADO.NET we have dataset. In rec

What is dbms, What is DBMS? It is a collection of programs that enables...

What is DBMS? It is a collection of programs that enables user to make and maintain a database. In other words it is general-purpose software that gives the users with the proc

Application that tracks production costuming, The costumer is an applicatio...

The costumer is an application that tracks production costuming, structure and other related pieces. We discussed this in detail and you have commentary and video to define the pro

What are tuples, What are tuples? Tuple is a fixed-size collection that...

What are tuples? Tuple is a fixed-size collection that can have elements of either similar or different data types. Same to arrays, a user must have to specify the size of a tu

CSS, Howto create a simple stylesheet for a web application

Howto create a simple stylesheet for a web application

Explain the dataadapter.update, Explain the DataAdapter.Update() and DataSe...

Explain the DataAdapter.Update() and DataSetAcceptChanges() methods. The DataAdapter.Update() method calls any of the DML statements, like UPDATE, INSERT, or DELETE statements,

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