Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercício fatorial #53

Open
danielavieiratester opened this issue Apr 10, 2023 · 1 comment
Open

Exercício fatorial #53

danielavieiratester opened this issue Apr 10, 2023 · 1 comment

Comments

@danielavieiratester
Copy link

Camila, estou adorando suas aulas. Eu já tenho uma noção de programação e estou relembrando e me atualizando contigo.
Por favor, qual o código para exibir o detalhe do fatoramento?
2! = 2 (2 x 1)

Esse (2x1)

Muito obrigada.

@cami-la
Copy link
Owner

cami-la commented Apr 17, 2023

Oi, @danielavieiratester. Tudo bem? (:
Muito obrigada pelo feedback, fico feliz que esteja gostando das aulas! <3

Segue um exemplo de fatorial de 2 com Java:

int n = 2;
int fatorial = 1;
for (int i = n; i > 0; i--) {
    fatorial *= i;
}
System.out.println("O fatorial de " + n + " é " + fatorial);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants