Repository navigation
Проектная работа №1. Alex32163216 - #1
Open
Alex32163216 wants to merge 4 commits into
Open
Alex32163216 wants to merge 4 commits into
Alex32163216 wants to merge 4 commits into
Conversation
gusar-off
reviewed
Jan 23, 2023
| float amountForPersons; | ||
| String templatePut = "Итого, с каждого человека по %.2f"; | ||
| amountForPersons = totalAmount / amountPersons; | ||
| switch ((int)amountForPersons % 10){ |
There was a problem hiding this comment.
| System.out.println("Введите названия и стоимости товаров (стоимости должны быть в формате рубли,копейки)."); | ||
|
|
||
| while(true){ | ||
| System.out.println("Введите название товара:"); |
There was a problem hiding this comment.
В тексте, выводимом пользователю, лучше явно указать, что при после "завершить", ввод товаров прекратится
| totalPriceOfProducts += priceOfProduct; | ||
| priceOfItem = (int) priceOfProduct; | ||
| trailingSlashes = ""; | ||
| for(int i = nameOfProduct.length(); i<= 30; i++) |
There was a problem hiding this comment.
Можно заменить на метод стандартной библиотеки - java.lang.String#repeat
Скорректированы ошибки с окончанием слово рубль, добавлена информация, что "После ввода команды "завершить", ввод товаров прекратится.".
Скорректированы ошибки с окончанием слово рубль, добавлена информация, что "После ввода команды "завершить", ввод товаров прекратится.".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Калькулятор счёта.
Код написан в 4-х классах. Считывает количество людей (на которых нужно разделить счет), название товаров, стоимости товаров. и в конце выводит все введение товары их стоимости, общую сумму товаров и итог деления общей суммы товаров на количество человек.