From 8131ddc22af5d39114a55349d71bcdc467599187 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Wed, 27 Mar 2024 13:09:08 -0600 Subject: Expand file structure, Vaporize skeleton --- vaporize/tests/Factorial.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 vaporize/tests/Factorial.java (limited to 'vaporize/tests/Factorial.java') diff --git a/vaporize/tests/Factorial.java b/vaporize/tests/Factorial.java new file mode 100644 index 0000000..d938bb6 --- /dev/null +++ b/vaporize/tests/Factorial.java @@ -0,0 +1,16 @@ +class Factorial{ + public static void main(String[] a){ + System.out.println(new Fac().ComputeFac(10)); + } +} + +class Fac { + public int ComputeFac(int num){ + int num_aux ; + if (num < 1) + num_aux = 1 ; + else + num_aux = num * (this.ComputeFac(num-1)) ; + return num_aux ; + } +} -- cgit v1.2.3