• Cursos
  • Compilador de Código
  • Debatir
  • Precios
  • Teams
Menu
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(🤔🤔🤔); } }

java
6th Mar 2023, 11:17 AM
King Ayoze
King Ayoze - avatar
2 Respuestas
+ 3
You'll enjoy recursion. https://www.sololearn.com/discuss/296069/?ref=app https://www.sololearn.com/discuss/2055474/?ref=app https://code.sololearn.com/c5A8aioWW4fZ/?ref=app https://code.sololearn.com/c2H6Y0yZAlOI/?ref=app https://code.sololearn.com/cZ11hPNQ5xr5/?ref=app https://code.sololearn.com/cj7pAcAEmqTm/?ref=app
6th Mar 2023, 12:11 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
Thanks
6th Mar 2023, 1:23 PM
King Ayoze
King Ayoze - avatar

¿Tienes a menudo preguntas como esta?

Aprende gratis de forma más eficaz

  • Introducción a Python

    7,1M de estudiantes

  • Introducción a Java

    4,7M de estudiantes

  • Introducción a C

    1,5M de estudiantes

  • Introducción a HTML

    7,5M de estudiantes

Ver todos los cursos
En tendencia hoy
Excuse me, why do they always ask us to input without telling us what it is for in python.
3 Votes
Should i learn python more or HTML?
2 Votes
how much time will it take to learn python OOP if i spend 1 hour everyday
0 Votes
C++ Vectors
0 Votes
Active learner
0 Votes
Code challenge
0 Votes
Is it good for student to study C++ first?
0 Votes
A Little Question Here!
1 Votes
Does solving a code coach actually give XPs?
2 Votes
(Resolved) Error: Gcc undefined reference to sha 256 🙄🤦🏽‍♀️
1 Votes