This preview shows page 1. Sign up to view the full content.
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 - 15 points total 5 points: Menu (while & switch) 5 points: Determining and displaying the largest number 5 points: Determining and displaying the factorial If you do not comment your code, points will be deducted....
View Full Document
- Spring '08