v1
This commit is contained in:
parent
2e2430c163
commit
6c11aa4ca2
29
Variablen und Ausdruecke aufg 1 und 2/.gitignore
vendored
Normal file
29
Variablen und Ausdruecke aufg 1 und 2/.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
Variablen und Ausdruecke aufg 1 und 2/.idea/.gitignore
generated
vendored
Normal file
8
Variablen und Ausdruecke aufg 1 und 2/.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
Variablen und Ausdruecke aufg 1 und 2/.idea/misc.xml
generated
Normal file
6
Variablen und Ausdruecke aufg 1 und 2/.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
Variablen und Ausdruecke aufg 1 und 2/.idea/modules.xml
generated
Normal file
8
Variablen und Ausdruecke aufg 1 und 2/.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$/Variablen und Ausdruecke aufg 1 und 2.iml" filepath="$PROJECT_DIR$/Variablen und Ausdruecke aufg 1 und 2.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
Variablen und Ausdruecke aufg 1 und 2/.idea/vcs.xml
generated
Normal file
6
Variablen und Ausdruecke aufg 1 und 2/.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>
|
@ -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>
|
40
Variablen und Ausdruecke aufg 1 und 2/src/Main.java
Normal file
40
Variablen und Ausdruecke aufg 1 und 2/src/Main.java
Normal file
@ -0,0 +1,40 @@
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
//afg1
|
||||
System.out.println("Hello world!");
|
||||
|
||||
|
||||
int a1, a2, a3;
|
||||
a1 = 1;
|
||||
a2 = 27;
|
||||
a3 = 11;
|
||||
|
||||
|
||||
//a
|
||||
System.out.println("Das arithmetische Mittel der Werte a1-a3 ist: " + (a1+a2+a3)/3);
|
||||
|
||||
//b
|
||||
System.out.println("Gilt a1 < a2 < a3? " + ((a1<a2) && (a2<a3)));
|
||||
|
||||
//c
|
||||
System.out.println("Ist a1 ein ganzzahliges Vielfaches von a2? " + ((a1%a2) == 0));
|
||||
|
||||
//d
|
||||
System.out.println("?");
|
||||
|
||||
//e
|
||||
a3 = Integer.MAX_VALUE;
|
||||
System.out.println("Der maximale Integerwert beträgt: " + a3);
|
||||
|
||||
//f
|
||||
a3 += 1;
|
||||
System.out.println("Der maximale Integerwert um 1 erhöht beträgt: " + a3);
|
||||
|
||||
//g
|
||||
a2 = 0xFFFFFFFF;
|
||||
System.out.println("?");
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user