Sunday, May 24, 2009

Exercise

/* Custom Project and Libraries Copyright, 2006. Venkat, ISS */

using System;
using System.Collections.Generic;
using System.Text;
using ISS.RV.LIB;

namespace Method
{
class Exercise
{
static void Main()
{
// Write the Main Program for Exercise here...


int number = ISSConsole.ReadInt("Enter the number");
Console.WriteLine( "The factorial Number is:"+ NumberType(number));
}
static int NumberType(int num )
{
int i;
int fact = 1;
//num = ISSConsole.ReadInt();
for (i = 1; i <= num; i++)
{
fact = fact * i;

//Console.WriteLine(fact);
}
return fact;



#region /* Do not remove this or write codes after this */
//ISSConsole.Pause();
#endregion
}
}
}

No comments:

Post a Comment