1public class Main {
2 public static void main(String[] args) {
3 var scanner = new java.util.Scanner(System.in);
4 System.out.print("What is n? ");
5 int n = scanner.nextInt();
6 int product = 1;
7 for (int i = 2; i <= n; ++i) {
8 product *= i;
9 }
10 System.out.println("The product of 1..n is " + product);
11 }
12}