Repository navigation
Conversation
| return "рублей"; | ||
| } | ||
| } | ||
| switch (strSum.charAt(k)) { |
There was a problem hiding this comment.
ошибка с окончанием слова рубль в этом куске кода
Author
|
Добрый день!
Добаила коммит, ПР:
Flottika#1
Функция rubl и switch работали корректно, но при вызове функции rubl из
calc (строка 19), по моему недосмотру туда передавалась не eachSum/100, а
sum, от этого была ошибка.
чт, 2 мая 2024 г. в 14:03, Челядинова Надя ***@***.***>:
… ***@***.**** commented on this pull request.
------------------------------
In src/main/java/Main.java
<#231 (comment)>
:
> + }
+ }
+ }
+ }
+ return goodsArrayList;
+ }
+ private static String rubl (double sum)
+ {
+ String strSum = sum + "";
+ int k = strSum.indexOf('.') - 1;
+ if (k > 0) {
+ if (strSum.charAt(k - 1) == '1') {
+ return "рублей";
+ }
+ }
+ switch (strSum.charAt(k)) {
ошибка с окончанием слова рубль в этом куске кода
—
Reply to this email directly, view it on GitHub
<#231 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBWGV722E5A7RSFKOV235FLZAIFP7AVCNFSM6AAAAABHCMRHBWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMZVGMZDSMZUHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
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.

Sprint 2. Practice 1. The first commit