From ca62526777729cf1cf914c45e5ca3c65175a21bc Mon Sep 17 00:00:00 2001 From: IFeelLikeGod Date: Tue, 23 Dec 2025 01:25:24 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D1=8B=D0=B9=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d527cc7f..745cfabf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Тестовый репозиторий для практики с Pull Request в GitHub -Этот репозиторий - *Ваше имя* +Этот репозиторий - *Тимур* ## Как этим пользоваться? From f52dfb9b9cbf012cb55c02664b2c03acd045d72b Mon Sep 17 00:00:00 2001 From: IFeelLikeGod <148801740+IFeelLikeGod@users.noreply.github.com> Date: Mon, 5 Jan 2026 17:39:25 +0000 Subject: [PATCH 2/3] Race Project --- VelocityOfCars.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VelocityOfCars.java b/VelocityOfCars.java index 1fec7378..6d1db50c 100644 --- a/VelocityOfCars.java +++ b/VelocityOfCars.java @@ -28,7 +28,7 @@ public static void main(String[] args) { Car winner = Race.winner(cars); if (winner == null) { - System.out.println("Нет машин с допустимой скоростью (0..250)."); + System.out.println("Нет машин с допустимой скоростью."); } else { System.out.println("Самый быстрый автомобиль: " + winner.name); @@ -59,6 +59,6 @@ static Car winner(Car[] cars) { } } } - return winner; + return winner; } } From 8d87fde40c7312735f12e9e6585d3598c8b1ba31 Mon Sep 17 00:00:00 2001 From: IFeelLikeGod <148801740+IFeelLikeGod@users.noreply.github.com> Date: Tue, 6 Jan 2026 12:45:58 +0300 Subject: [PATCH 3/3] Delete VelocityOfCars.java --- VelocityOfCars.java | 64 --------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 VelocityOfCars.java diff --git a/VelocityOfCars.java b/VelocityOfCars.java deleted file mode 100644 index 6d1db50c..00000000 --- a/VelocityOfCars.java +++ /dev/null @@ -1,64 +0,0 @@ -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - int n = 3; - - - Car[] cars = new Car[n]; - - for (int i = 0; i < n; i++) { - System.out.println("Введите название машины №" + (i + 1) + ":"); - String name = scanner.nextLine(); - - double velocity; - while (true) { - System.out.println("— Введите скорость машины №" + (i + 1) + ":"); - velocity = scanner.nextDouble(); - scanner.nextLine(); - - if (velocity >= 0 && velocity <= 250) break; - System.out.println("Неправильная скорость"); - } - - cars[i] = new Car(name, velocity); - } - - Car winner = Race.winner(cars); - - if (winner == null) { - System.out.println("Нет машин с допустимой скоростью."); - } else { - System.out.println("Самый быстрый автомобиль: " + winner.name); - - } - - scanner.close(); - } -} - -class Car { - String name; - double velocity; - - Car(String name, double velocity) { - this.name = name; - this.velocity = velocity; - } -} - -class Race { - static Car winner(Car[] cars) { - Car winner = null; - - for (Car c : cars) { - if (c.velocity >= 0 && c.velocity <= 250) { - if (winner == null || c.velocity * 24 > winner.velocity * 24) { - winner = c; - } - } - } - return winner; - } -}