Skip to content

Исправление №1. - #1

Open
AlYam79 wants to merge 1 commit into
masterfrom
suffix
Open

AlYam79 wants to merge 1 commit into
masterfrom
suffix

Conversation

@AlYam79

@AlYam79 AlYam79 commented Nov 29, 2022

Copy link
Copy Markdown
Owner

No description provided.

Comment thread src/main/java/Main.java
public class Main {
public static String chooseSuffix(float number) { // Создаем метод который выбирает окончания.
int divider = 10; // Объявляем переменную делителя
if (number >= 11 && number <=14) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

между 11 и 14 лучше проверять не number, а (int) Math.floor(number) % 100, это для случаев, когда у нас 112 гостей или 214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants