Skip to content

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

Open
AlYam79 wants to merge 1 commit intomasterfrom
suffix
Open

Исправление №1.#1
AlYam79 wants to merge 1 commit intomasterfrom
suffix

Conversation

@AlYam79
Copy link
Copy Markdown
Owner

@AlYam79 AlYam79 commented Nov 29, 2022

No description provided.

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