mirror of
https://github.com/ASDjonok/OOP_IO-2x_2023.git
synced 2026-04-20 04:51:51 +03:00
Add files via upload
This commit is contained in:
11
lab1/lab1.iml
Normal file
11
lab1/lab1.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
lab1/out/production/lab1/Main.class
Normal file
BIN
lab1/out/production/lab1/Main.class
Normal file
Binary file not shown.
20
lab1/src/Main.java
Normal file
20
lab1/src/Main.java
Normal file
@@ -0,0 +1,20 @@
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
float s = 0, a = 2, b = 1, m = 6, n = 4;
|
||||
|
||||
for (float i = a; i <= m; i++) {
|
||||
for (float j = b; j <= n; j++) {
|
||||
// Перевірка ділення на 0.
|
||||
if (i == -1) {
|
||||
System.out.println("Помилка: ділення на нуль не можливе.");
|
||||
return;
|
||||
}
|
||||
s += (i + j) / (i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("S = " + s);
|
||||
}
|
||||
|
||||
}
|
||||
BIN
lab1/ООП lab1.pdf
Normal file
BIN
lab1/ООП lab1.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user