GitHub Viewer
import java.util.*;
public class FactorialExample {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the integer you want the factorial of: ");
int factorial = scanner.nextInt();
while(factorial