Question: Hello! Could you help me with this Java code? You are to write 2 programs, 1 using a for loop and the other using a

Hello! Could you help me with this Java code?

"You are to write 2 programs, 1 using a for loop and the other using a while loop. Each program will ask the user to enter a number to determine the factorial for. In one case a for loop will be used, in the other a while loop. Recall the factorial of n (n!) is defined as n*n-1*n-2...*1. So 5! is 5*4*3*2*1. Test your programs with the factorial of 11 which is 39916800."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!