Pls help me with this.I want take an input and output the factorial of that input | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Pls help me with this.I want take an input and output the factorial of that input

Scanner sc = new Scanner(System.in); int N = Scanner.sc.nextInt(); int 🤔🤔🤔 = 1; for(int x= 1;x<=N;x++) { 🤔🤔🤔 *=x; } System.out.println(🤔🤔🤔); } }

6th Mar 2023, 11:17 AM
The Philosopher
The Philosopher - avatar
2 Answers