geändert am 24.10.2023
This commit is contained in:
commit
6ca8526699
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
6
.idea/misc.xml
generated
Normal file
6
.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_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
8
.idea/modules.xml
generated
Normal file
8
.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$/Prog3.iml" filepath="$PROJECT_DIR$/Prog3.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
10
.idea/runConfigurations.xml
generated
Normal file
10
.idea/runConfigurations.xml
generated
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RunConfigurationProducerService">
|
||||||
|
<option name="ignoredProducers">
|
||||||
|
<set>
|
||||||
|
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.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
Prog3.iml
Normal file
11
Prog3.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>
|
BIN
out/production/Prog3/Praktikum01/Zahlenfilter.class
Normal file
BIN
out/production/Prog3/Praktikum01/Zahlenfilter.class
Normal file
Binary file not shown.
34
src/Praktikum01/Zahlenfilter.java
Normal file
34
src/Praktikum01/Zahlenfilter.java
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package Praktikum01;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Zahlenfilter {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
int count = 1;
|
||||||
|
counter(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void counter(int c){
|
||||||
|
|
||||||
|
for(int i = 0; i < 200; i++){
|
||||||
|
int preC = c-1;
|
||||||
|
int ergebnis = c + preC;
|
||||||
|
int ergebnis2 = preC + c;
|
||||||
|
|
||||||
|
if (c % 5 == 0){
|
||||||
|
System.out.println(c + " ist durch 5 teilbar");
|
||||||
|
c++;
|
||||||
|
}else if(c % 10 == 9){
|
||||||
|
System.out.println(c + " endet auf 9");
|
||||||
|
c++;
|
||||||
|
}else if(ergebnis % 3 == 0 && ergebnis2 % 3 == 0){
|
||||||
|
System.out.println(c + " und " + preC + " addiert ergeben " + ergebnis + " und " + ergebnis2 + " ist durch 3 teilbar." );
|
||||||
|
c++;
|
||||||
|
}else{
|
||||||
|
System.out.println(c);
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user