This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: for loop. Display the result. In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5 ! = 1 x 2 x 3 x 4 x 5 = 120 and 6 ! = 1 x 2 x 3 x 4 x 5 x 6 = 720. Use the Scanner class to get input from the user, and use System.out to print to the console window. Make sure to comment your code. Grading - 30 points total 10 points: Menu (while & switch) 10 points: Determining and displaying the largest number 10 points: Determining and displaying the factorial If you do not comment your code, points will be deducted....
View Full Document
- Spring '08