BP
This commit is contained in:
8
BP/.idea/.gitignore
generated
vendored
Normal file
8
BP/.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
BP/.idea/misc.xml
generated
Normal file
6
BP/.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_19" default="true" project-jdk-name="19" project-jdk-type="JavaSDK">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
8
BP/.idea/modules.xml
generated
Normal file
8
BP/.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$/BP.iml" filepath="$PROJECT_DIR$/BP.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
BP/.idea/vcs.xml
generated
Normal file
6
BP/.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
BP/BP.iml
Normal file
11
BP/BP.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$" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
Binary file not shown.
@@ -1,38 +0,0 @@
|
|||||||
import java.util.*;
|
|
||||||
|
|
||||||
class GKD{
|
|
||||||
public int c;
|
|
||||||
public static void main(String[] args){
|
|
||||||
System.out.println("a und b eingeben(durch Leerzeichen getrennt)");
|
|
||||||
Scanner sc = new Scanner(System.in);
|
|
||||||
int input1 = sc.nextInt();
|
|
||||||
int input2 = sc.nextInt();
|
|
||||||
System.out.println("Das Ergebniss von modulo ist: " + modulo(input1,input2));
|
|
||||||
System.out.println("Das Ergebnis von gdk ist: "+ gdk(input1,input2));
|
|
||||||
// ergebnis von gdk(10,25) ist 5
|
|
||||||
}
|
|
||||||
public static int modulo(int a, int b){
|
|
||||||
return b % a;
|
|
||||||
}
|
|
||||||
public static int moduloSicher(int a, int b){
|
|
||||||
if(a > 0 && b > 0){
|
|
||||||
return b % a;
|
|
||||||
}
|
|
||||||
else if(b == 0 && a > 0){
|
|
||||||
return a;
|
|
||||||
}
|
|
||||||
else if(a == 0){
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
public static int gdk(int a, int b){
|
|
||||||
while(a != b){
|
|
||||||
int c = moduloSicher(a,b);
|
|
||||||
a = b;
|
|
||||||
b = c;
|
|
||||||
}
|
|
||||||
return a;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
2
BP/EidP_BP_3/Boot.java
Normal file
2
BP/EidP_BP_3/Boot.java
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
package EidP_BP_3;public class Boot {
|
||||||
|
}
|
||||||
2
BP/EidP_BP_3/BootsTest.java
Normal file
2
BP/EidP_BP_3/BootsTest.java
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
package EidP_BP_3;public class BootsTest {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user