lr13 -> task_1 -> e1-e14

This commit is contained in:
2026-05-23 16:50:10 +05:00
parent 7310b240fd
commit 7c4e17e1b1
14 changed files with 230 additions and 0 deletions

17
lr13/task_1/e13.java Normal file
View File

@@ -0,0 +1,17 @@
package lr13.task_1;
public class e13 {
public static void main(String[] args) {
try {
int l = args.length;
System.out.println("размер массива = " + l);
int h = 10 / l;
args[l + 1] = "10";
} catch (ArithmeticException e) {
System.out.println("Деление на ноль");
} catch (ArrayIndexOutOfBoundsException e) {
System.out.println("Индекс не существует");
}
}
}