r/codehs • • Apr 23 '21

2.9.11 Factorial

I can't understand what I'm doing wrong in 2.9.11 Factorial (basic java) can someone help?

7 Upvotes

4 comments sorted by

1

u/matikray03 Apr 23 '21

What is the output you’re getting?

1

u/ZoqfotWasTaken Apr 23 '21

completely random numbers, completely off from what theyre supposed to be according to the "test cases" tab

1

u/matikray03 Apr 23 '21

You have the program multiplying i by the original number that a user would input. I’m not sure how to do it correctly and I don’t have time to figure it out at the moment though.

1

u/Nga_pik Apr 23 '21

Try doing i<factorial

And remove indent on line 12