public class Factorial { public static void main(String[] args) { final int NUM_FACTS = 100; for(int i = 0; i < NUM_FACTS; i++) System.out.println(i + "! is " + factorial(i)); } public static int factorial(int n) { int result = 1; for(int i = 2; i <= n; i++) result *= i; return result; } } |
The source code above is an interactive live demo of Prism Syntax Highlighter for Confluence that shows some of the features:
|
The source code above is an interactive live demo of Prism Syntax Highlighter for Confluence that includes (markdown) code from GitHub (https://raw.githubusercontent.com/PrismJS/prism/master/README.md). Besides including the code from the remote location the demo shows some of the other features:
|