Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

Commit 47d238e

Browse files
committed
Merge remote-tracking branch 'origin/main'
# Conflicts: # pom.xml
2 parents c89b29c + 761d309 commit 47d238e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2138
-1
lines changed

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
<module>students/24K0459</module>
4343
<module>students/23K0364</module>
4444
<module>students/23K0155</module>
45-
<module>students/23K0202</module>
4645
</modules>
4746

4847
<dependencies>

students/23K0114/23K0114-p01/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<artifactId>23K0114</artifactId>
7+
<groupId>ru.mirea.practice</groupId>
8+
<version>2024.1</version>
9+
<relativePath>../pom.xml</relativePath>
10+
</parent>
11+
<artifactId>23K0114-p01</artifactId>
12+
<description>Массивы</description>
13+
</project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package ru.mirea.practice.s23k0114.lab1;
2+
3+
public final class Task1 {
4+
private Task1() {}
5+
6+
public static void main(String[] args) {
7+
System.out.println("asd");
8+
}
9+
}

students/23K0114/README.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Дмитрий Дандыль КВБО-01-23

students/23K0114/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<artifactId>algorithms-and-data-structures</artifactId>
7+
<groupId>ru.mirea.practice</groupId>
8+
<version>2024.1</version>
9+
<relativePath>../../pom.xml</relativePath>
10+
</parent>
11+
<artifactId>23K0114</artifactId>
12+
<packaging>pom</packaging>
13+
<description>Практическая работа Давид Гобеджишвили</description>
14+
15+
<modules>
16+
<module>23K0114-p01</module>
17+
</modules>
18+
</project>

students/23K0368/23K0368-p03/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<artifactId>23K0368</artifactId>
7+
<groupId>ru.mirea.practice</groupId>
8+
<version>2024.1</version>
9+
<relativePath>../pom.xml</relativePath>
10+
</parent>
11+
<artifactId>23K0368-p03</artifactId>
12+
<description>Третье задание</description>
13+
</project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package ru.mirea.practice.s0000001;
2+
3+
import java.util.Arrays;
4+
import java.util.Random;
5+
6+
public abstract class First {
7+
public static void main(String[] args) {
8+
Float[] array1 = new Float[10];
9+
Random random = new Random();
10+
11+
for (int i = 0; i < 10; i++) {
12+
array1[i] = random.nextFloat();
13+
}
14+
System.out.println("1 Массив, созданный с помощью класса Random(): ");
15+
System.out.println(Arrays.toString(array1));
16+
array1 = Arrays.stream(array1).sorted().toArray(Float[]::new);
17+
System.out.println(Arrays.toString(array1));
18+
19+
System.out.println();
20+
Float[] array2 = new Float[10];
21+
22+
for (int i = 0; i < 10; i++) {
23+
array2[i] = (float) Math.random();
24+
}
25+
System.out.println("2 Массив, созданный с помощью метода random(): ");
26+
System.out.println(Arrays.toString(array2));
27+
array2 = Arrays.stream(array2).sorted().toArray(Float[]::new);
28+
System.out.println(Arrays.toString(array2));
29+
}
30+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package ru.mirea.practice.s0000001;
2+
3+
import java.util.ArrayList;
4+
import java.util.Arrays;
5+
import java.util.Random;
6+
import java.util.Scanner;
7+
8+
public abstract class Fourth {
9+
public static void main(String[] args) {
10+
try (Scanner sc = new Scanner(System.in)) {
11+
int n = 0;
12+
System.out.println("Введите число: ");
13+
while (n == 0) {
14+
if (sc.hasNextInt()) {
15+
n = sc.nextInt();
16+
} else {
17+
System.out.println("Введите число!");
18+
}
19+
}
20+
21+
Integer[] array = new Integer[n];
22+
Random random = new Random();
23+
for (int i = 0; i < n; i++) {
24+
array[i] = random.nextInt(n);
25+
}
26+
System.out.println(Arrays.toString(array));
27+
28+
ArrayList<Integer> list = new ArrayList<>();
29+
for (int i = 0; i < n; i++) {
30+
if (array[i] % 2 == 0) {
31+
list.add(array[i]);
32+
}
33+
}
34+
System.out.println(list);
35+
}
36+
}
37+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package ru.mirea.practice.s0000001;
2+
3+
import java.util.Formatter;
4+
5+
public abstract class Test {
6+
public static void main(String[] args) {
7+
double x = 1000.0 / 3.0;
8+
System.out.println("Строка без форматирования: " + x);
9+
try (Formatter formatter = new Formatter()) {
10+
formatter.format("Строка c форматированием: %.2f%n", x);
11+
formatter.format("Строка c форматированием: %8.2f%n", x);
12+
formatter.format("Строка c форматированием: %16.2f%n", x);
13+
System.out.println(formatter);
14+
}
15+
}
16+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package ru.mirea.practice.s0000001;
2+
3+
import java.util.Arrays;
4+
import java.util.Random;
5+
6+
public abstract class Third {
7+
public static void main(String[] args) {
8+
Integer[] array = new Integer[4];
9+
Random random = new Random();
10+
11+
for (int i = 0; i < array.length; i++) {
12+
array[i] = random.nextInt(100);
13+
}
14+
System.out.println(Arrays.toString(array));
15+
16+
int cmt = 0;
17+
for (int i = 1; i < array.length; i++) {
18+
if (array[i] > array[i - 1]) {
19+
cmt++;
20+
}
21+
}
22+
if (cmt == array.length) {
23+
System.out.println("Последовательность строго возрастающая");
24+
} else {
25+
System.out.println("Последовательность не строго возрастающая");
26+
}
27+
28+
}
29+
}

0 commit comments

Comments
 (0)