Compare commits
10 Commits
d36d4542b0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 96b18f7cd3 | |||
| dab17ba977 | |||
| b6f523971a | |||
| 6b20e56bbe | |||
| 5734168d9f | |||
| 0080b6c1b8 | |||
| 09e6ffad29 | |||
| 7a4dd3e3e7 | |||
| 41342670c6 | |||
| 28dc8157b5 |
@@ -0,0 +1,3 @@
|
|||||||
|
enum Status {
|
||||||
|
LOW, MEDIUM, HIGH
|
||||||
|
}
|
||||||
+13
-9
@@ -1,19 +1,23 @@
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Scanner;
|
import java.util.SplittableRandom;
|
||||||
|
|
||||||
public class TaskDemo {
|
public class TaskDemo {
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String[] words = {"код", "Програмирование", "джава"};
|
int[] userId = {101, 102, 103, 104, 105};
|
||||||
System.out.println(findLongestWorld(words));
|
boolean[] userStatus = {true, false, true, false, true};
|
||||||
|
printPremiumUser(userId, userStatus);
|
||||||
|
|
||||||
}
|
}
|
||||||
public static String findLongestWorld (String[] world) {
|
public static void printPremiumUser (int[] userId, boolean[] userStatus) {
|
||||||
String longest = world[0];
|
for (int i = 0; i < userId.length; i++) {
|
||||||
for (int i = 1; i < world.length; i++) {
|
if (userStatus[i]) {
|
||||||
if (longest.length() < world[i].length()) {
|
System.out.print(userId[i] + " ");
|
||||||
longest = world[i];
|
|
||||||
}
|
}
|
||||||
} return longest;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-18
@@ -1,18 +0,0 @@
|
|||||||
public class U {
|
|
||||||
|
|
||||||
public static void pl (String text) {
|
|
||||||
System.out.println(text);
|
|
||||||
}
|
|
||||||
public static void pl (int number) {
|
|
||||||
System.out.println(number);
|
|
||||||
}
|
|
||||||
public static void pl (double number) {
|
|
||||||
System.out.println(number);
|
|
||||||
}
|
|
||||||
public static void pl (float number) {
|
|
||||||
System.out.println(number);
|
|
||||||
}
|
|
||||||
public static void pl (int[] array) {
|
|
||||||
System.out.println(java.util.Arrays.toString(array));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user