Created
December 2, 2025 11:07
-
-
Save emanoelbarreiros/21d5e3917718b510573e4b0d8ad13b5f to your computer and use it in GitHub Desktop.
Fatorial iterativo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FatorialIterativo { | |
| public static int fatorialIterativo(int n) { | |
| int resultado = 1; | |
| for (int i = 1; i <= n; i++) { | |
| resultado *= i; | |
| } | |
| return resultado; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment