From 39a00fb698590df5549afd8548b9c0f2572729bc Mon Sep 17 00:00:00 2001 From: Matti Date: Wed, 10 Apr 2024 16:32:01 +0200 Subject: [PATCH] add 4 --- src/part4/aufg4.java | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/part4/aufg4.java diff --git a/src/part4/aufg4.java b/src/part4/aufg4.java new file mode 100644 index 0000000..a2b5a55 --- /dev/null +++ b/src/part4/aufg4.java @@ -0,0 +1,31 @@ +package part4; + +import static java.lang.Math.round; + +public class aufg4 { + public static void main(String[] args){ + int start = 5000; + int time = 20; + double interest1 = 1.01; //weird bug if these are floats + double interest2 = 1.02; + double interest3 = 1.04; + + double start1 = start; + double start2 = start; + double start3 = start; + + for(int i=0; i