Java Tuorial - OOP Language Basics Primitive Data Types Convert Units Conversion Tables
Updated : March 20, 2009 8:13 AM
Program 162a (small factorials)
Program Description: Write a program that finds the factorial of a value entered by the user. To calculate 12! (12 factorial) for example the program should calculate the value of
1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12.
The program should continue processing numbers until the user inputs a zero. Be sure not to process the terminal value (zero).
Required Statements: input, output, loop control
Sample Output:
Enter a number 6 the value of 6! is 720
Enter a number 12 the value of 12! is 479001600
Enter a number 0
Ala All Als Be Da D'Ar K Co K Cu Ki Lo My Sa Sc Vi Not Listed
Last Name :
Email :
Select one of the following that describes when and why you are filling out this form: This assignment is in on time. This assignment is in on time, being resubmitted due to a failed submission (I have a copy of the original submission). This assignment is a corrected submission for half the missed credit. This assignment is one day late and will lose 15%. This assignment is more than one day late (half credit at best). This assignment is late because of an EXCUSED absence. This assignment is being resubmitted at the request of the teacher.
code
Updated: Monday, September 20, 2010 2:41 PM