1// Reverse factorial program in java
2import java.util.Scanner;
3public class ReverseFactorialProgram
4{
5 public static void main(String[] args)
6 {
7 Scanner sc = new Scanner(System.in);
8 System.out.println("Please enter a number to compute reverse factorial: ");
9 int number = sc.nextInt();
10 int reverse = number;
11 for(int a = 2; reverse != a; a++)
12 {
13 reverse = reverse / a;
14 }
15 System.out.println("Reverse factorial of " + number + " is: " + reverse);
16 sc.close();
17 }
18}