v1
This commit is contained in:
parent
186872ad58
commit
c03543b334
29
Kontrollstrukturen/afg4 zinsen/.gitignore
vendored
Normal file
29
Kontrollstrukturen/afg4 zinsen/.gitignore
vendored
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
### IntelliJ IDEA ###
|
||||||
|
out/
|
||||||
|
!**/src/main/**/out/
|
||||||
|
!**/src/test/**/out/
|
||||||
|
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
bin/
|
||||||
|
!**/src/main/**/bin/
|
||||||
|
!**/src/test/**/bin/
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
8
Kontrollstrukturen/afg4 zinsen/.idea/.gitignore
generated
vendored
Normal file
8
Kontrollstrukturen/afg4 zinsen/.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
6
Kontrollstrukturen/afg4 zinsen/.idea/misc.xml
generated
Normal file
6
Kontrollstrukturen/afg4 zinsen/.idea/misc.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
8
Kontrollstrukturen/afg4 zinsen/.idea/modules.xml
generated
Normal file
8
Kontrollstrukturen/afg4 zinsen/.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/afg4 zinsen.iml" filepath="$PROJECT_DIR$/afg4 zinsen.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
Kontrollstrukturen/afg4 zinsen/.idea/vcs.xml
generated
Normal file
6
Kontrollstrukturen/afg4 zinsen/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
11
Kontrollstrukturen/afg4 zinsen/afg4 zinsen.iml
Normal file
11
Kontrollstrukturen/afg4 zinsen/afg4 zinsen.iml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
43
Kontrollstrukturen/afg4 zinsen/src/Main.java
Normal file
43
Kontrollstrukturen/afg4 zinsen/src/Main.java
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
float startwert = 23550.5F;
|
||||||
|
int laufzeit = 10;
|
||||||
|
|
||||||
|
float zinssatz1, zinssatz2, zinssatz3;
|
||||||
|
zinssatz1 = 2.3F;
|
||||||
|
zinssatz2 = 0.5F;
|
||||||
|
zinssatz3 = 1.0F;
|
||||||
|
|
||||||
|
float haben1 = startwert;
|
||||||
|
float haben2 = startwert;
|
||||||
|
float haben3 = startwert;
|
||||||
|
|
||||||
|
for (int i=1; i <= laufzeit; i++){
|
||||||
|
|
||||||
|
haben1 = (haben1 + haben1*(zinssatz1/100));
|
||||||
|
System.out.println("Nach " + i + " Jahren beträgt das Haben mit Zinssatz1: " + haben1 + " Euro.");
|
||||||
|
|
||||||
|
}
|
||||||
|
System.out.println("==============================================");
|
||||||
|
|
||||||
|
for (int i=1; i <= laufzeit; i++){
|
||||||
|
|
||||||
|
haben2 = (haben2 + haben2*(zinssatz2/100));
|
||||||
|
System.out.println("Nach " + i + " Jahren beträgt das Haben mit Zinssatz2: " + haben2 + " Euro.");
|
||||||
|
|
||||||
|
}
|
||||||
|
System.out.println("==============================================");
|
||||||
|
|
||||||
|
for (int i=1; i <= laufzeit; i++){
|
||||||
|
|
||||||
|
haben3 = (haben3 + haben3*(zinssatz3/100));
|
||||||
|
System.out.println("Nach " + i + " Jahren beträgt das Haben mit Zinssatz3: " + haben3 + " Euro.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user