| 1 | import java.util.Scanner; |
| 2 | |
| 3 | public class Factorial { |
| 4 | public static void main(String[] args) { |
| 5 | Scanner sc = new Scanner(System.in); |
| 6 | int n = sc.nextInt(); |
| 7 | |
| 8 | int fact = 1; |
| 9 | |
| 10 | for(int i = 1; i <= n; i++){ |
| 11 | fact = fact * i; |
| 12 | System.out.println("Factorial of " + i + ": " + fact); |
| 13 | } |
| 14 | } |
| 15 | } |
nothing calls this directly
no outgoing calls
no test coverage detected