This commit is contained in:
2026-03-15 20:40:00 +05:00
parent 06a34a1406
commit 775b21a9c4
5 changed files with 100 additions and 0 deletions

15
lr9/task_1/e4.java Normal file
View File

@@ -0,0 +1,15 @@
import java.util.Scanner;
class Main {
public static void main(String[] args) {
System.out.println(fact(5));
}
public static int fact(int n){
int res;
if (n == 1) return 1;
else{
res = fact(n - 1) * n;
return res;
}
}
}