Skip to content

Conversation

@Averkieva
Copy link
Owner

No description provided.

Scanner scanner = new Scanner(System.in);
System.out.println("На сколько человек нужно разделить счет?");
int countOfPeople;
while(1==1){//бесконечный цикл для того, чтобы программа попросила ввести снова количество людей
Copy link

Choose a reason for hiding this comment

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

Можно просто написать while(true) и цикл тоже будет бесконечный

@@ -0,0 +1,12 @@
public class correctWriting {
public static String WritingRub(int countOfRub){
Copy link

Choose a reason for hiding this comment

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

название методов(функций) согласно CodeStyles должны быть с маленькой буквы, а вот названия классов наоборот с большой

String str;
if (countOfRub % 10 > 1 && countOfRub % 10 <=4)
str = "рубля";
else if (countOfRub % 10 == 1)
Copy link

Choose a reason for hiding this comment

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

если countOfRub будет 111, то окончание выведется неверное

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.

3 participants