Last active
June 27, 2023 05:04
-
-
Save CodesysOneLove/009e9b57a9f63053b480e990edded009 to your computer and use it in GitHub Desktop.
This file contains 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
class FactorialExample{ | |
public static void main(String args[]){ | |
int i,fact=1; | |
int number=5;// число, для которого вычисляется факториал | |
for(i=1;i<=number;i++){ | |
fact=fact*i; | |
} | |
System.out.println(Factorial of +number+ is: +fact); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment