int n = sc.nextInt(); System.out.printf( "%d! = ", n ); long f = 1; for( ; n > 1; n-- ) { f *= n; } System.out.println( f );