The product of numbers from a to b

Report a typo

Write a program that prints the product of all integer numbers from a to b (a < b).

Include a and exclude b from the product.

For example, if a=2 and b=5, then the answer is 2*3*4=24.

Sample Input 1:

1 2

Sample Output 1:

1

Sample Input 2:

6 14

Sample Output 2:

51891840
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// start coding here
}
}
___

Create a free account to access the full topic