Skip to content
Snippets Groups Projects
Commit 772f6918 authored by David Dillkötter's avatar David Dillkötter
Browse files

Init

parents
Branches master
No related tags found
No related merge requests found
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-13.0.1">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
.project 0 → 100644
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Zinsrechner</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=12
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=12
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=12
/Zinsrechner.class
public class Zinsrechner {
public static void gruss() {
System.out.println("Willkommen zur Zinsrechnung:");
}
public static double zins (double kp, double zs, int n) {
double betrag = kp;
for ( int i= 1; i<=n; i++) {
betrag=betrag+betrag*zs;
}
return betrag;
}
public static void main (String[] args) {
double kap = 100.0;
int jahre = 10;
double zins=0.02;
double zinsSatz;
double endKapital;
//gruss();
// for (int z=1; z<=10; z++) {
// zinsSatz = z/100.0;
// endKapital = zins (kapital, zinsSatz, jahre);
// ausgabe (endKapital, z);
// }
//endKapital=zins(100.0,0.02,10);
//endKapital=zins(kap,zins,jahre);
//endKapital=zins(2*kap,zins+0.01,jahre-3);
endKapital=zins(kap,0.05,jahre*10);
System.out.println(endKapital);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment