summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pygmentex/Factorial.java
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-20 21:53:18 +0000
committerKarl Berry <karl@freefriends.org>2014-08-20 21:53:18 +0000
commit95d91547803a6ceab929ef723dfdebe0e31e7a7e (patch)
treeb0bab3bb1fed9f52a46cdb1f36a29d516c3ae2fe /Master/texmf-dist/doc/latex/pygmentex/Factorial.java
parent1dd6e5bec91358ff6bcd1964121979187a676cb4 (diff)
pygmentex (12aug14)
git-svn-id: svn://tug.org/texlive/trunk@34996 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/pygmentex/Factorial.java')
-rw-r--r--Master/texmf-dist/doc/latex/pygmentex/Factorial.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pygmentex/Factorial.java b/Master/texmf-dist/doc/latex/pygmentex/Factorial.java
new file mode 100644
index 00000000000..aea3cb5c8c3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/pygmentex/Factorial.java
@@ -0,0 +1,12 @@
+public class Factorial
+{
+ public static void main(String[] args)
+ {
+ int number = 5;
+ int factorial = 1;
+ for (int i = 1; i <= number; i++)
+ factorial = factorial * i;
+ System.out.println("Factorial of " + number +
+ " is " + factorial);
+ }
+}