The ultimate destination for quality online tuitions, assignment and homework help

+1 (718) 3957640
+1 (718) 3957640

Gtalk/MSN/Yahoo! ID: assignment.maker

HwA Blog

Java Programming help at HelpWithAssignment.com (Finding Factorial)

Feb 01 2011

Java Factorial Example
This Java Factorial Example shows how to calculate factorial of a given number using Java.

public class NumberFactorial {
public static void main(String[] args) {

int number = 5;
/*
* Factorial of any number is !n.
* For example, factorial of 4 is 4*3*2*1.
*/

int factorial = number;

for(int i =(number – 1); i > 1; i–)

{
factorial = factorial * i;

}

System.out.println(“Factorial of a number is ” + factorial);
}
}

Here in the code we can see that in the first few lines the definition for a factorial is defined. Now, this definition is being applied in the following lines as “int factorial = number” or factorial of an integer equals to the number – 1; the number must be greater than 1 and the integer i is decremented by 1 until 1 is arrived at. The next process is the multiplication of the numbers obtained. This is seen in factorial = factorial*i. This will give the exact value of the factorial.

At HelpWithAssignment.com we provide the best Assignment help, Homework help and Online Tutoring in Java and other Programming languages. Our tutors are experts in Java and other Programming Languages like C, C++, C#, ASP.net, JSP.net, QBasic, Perl, Fortran, etc. The list is not exhaustive.

For more details you can visit our website at http://www.helpwithassignment.com/ and http://www.helpwithassignment.com/programing-assignment-help
You can follow us on our blogs at http://helpwithassignment.blogspot.com/ and http://helpwithassignment.wordpress.com/
This is in continuation with our previous articles on Java and Java Assignment help

Comments

tom

Can you do this new program? in java

on the stock market – options

in these problems, n refers to the number of binomial periods.

assume all rates are continuously compounding.

Let S = $100 , K = $ 95 , r = 8 % , T = 1 , volatility = 30% , delta = 0 . h = .5

Let u = 1.3 , d = 0.8 , and n = 100

Construct the binomial tree for a call option.

out put:

At each node provide the premium, shares of stock and a dollar amount B in lending.

print out the last line.

cool…

Dweezil

You have the monopoly on ufseul information-aren’t monopolies illegal? ;)

cool…

Leave a Reply

Your Name: (required)
Your Email(will not be published): (required)
Website: (not required)
Message: (required)

Assignment Request

Name :
Email :
Phone :
Upload H/W File:
Instruction:
Due Date:
Hours:

Free Download

Bookmark and Share
Copyright © 2012 HelpWithAssignment.com. All rights reserved.
Assignment Help, Accounting Assignment Help, Statistics Assignment Help, MBA Assignment Help, Assignment Writing Service
Associate Website: http://www.helpwiththesis.com