Compare commits
1 Commits
ІО-24/25-С
...
IO-20/00-А
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
860a447ff9 |
@@ -1,11 +0,0 @@
|
|||||||
<?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>
|
|
||||||
Binary file not shown.
@@ -1,38 +0,0 @@
|
|||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.Scanner;
|
|
||||||
|
|
||||||
public class Main {
|
|
||||||
/* Номер залікової книжки - 2425,
|
|
||||||
C2 = 1, C3 = 1 = C,C5 = 0, C7 = 3, index's type = long */
|
|
||||||
private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#.##");
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
//System.out.println("Перед тим як вводити значення враховуйте умову: 0 < a <= n\n 0 <= b <= m");
|
|
||||||
System.out.print("\nВеддіть ваше значення a: ");
|
|
||||||
Scanner a1 = new Scanner(System.in);
|
|
||||||
int a = a1.nextInt();
|
|
||||||
System.out.print("\nВеддіть ваше значення b: ");
|
|
||||||
Scanner b1 = new Scanner(System.in);
|
|
||||||
int b = b1.nextInt();
|
|
||||||
System.out.print("\nВеддіть ваше значення m: ");
|
|
||||||
Scanner m1 = new Scanner(System.in);
|
|
||||||
int m = m1.nextInt();
|
|
||||||
System.out.print("\nВеддіть ваше значення n: ");
|
|
||||||
Scanner n1 = new Scanner(System.in);
|
|
||||||
int n = n1.nextInt();
|
|
||||||
double S = 0;
|
|
||||||
final int C = 1; //Const
|
|
||||||
if (b >= 0 && a <= n && b <= m && a > 1) {
|
|
||||||
for (long i = a; i <= n; i++) {
|
|
||||||
for (long j = b; j <= m; j++) {
|
|
||||||
S += (double) (i * j) / (i - C);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
System.out.println("Значення S = " + DECIMAL_FORMAT.format(S));
|
|
||||||
} else {
|
|
||||||
System.out.println("Значення А має бути > 0\nЗначення А має бути <= n");
|
|
||||||
System.out.println("Значення B має бути >= 0\nЗначення B має бути <= m");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println(args[2]);
|
System.out.println(args[0]);
|
||||||
System.out.println("Hello world!");
|
System.out.println("Hello world!");
|
||||||
// System.out.println(1);
|
// System.out.println(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package encapsulationInheritancePolymorphism.inheritance;
|
|
||||||
|
|
||||||
public class ElectricEngine extends Engine {
|
|
||||||
private String batteryType;
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
package encapsulationInheritancePolymorphism.inheritance;
|
|
||||||
|
|
||||||
public class Engine {
|
|
||||||
private int power;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package encapsulationInheritancePolymorphism.inheritance;
|
|
||||||
|
|
||||||
public class Main {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
ElectricEngine electricEngine = new ElectricEngine();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user