Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue with conversion. #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tutelarix
Copy link

@tutelarix tutelarix commented Oct 12, 2022

When we put 2.53, the result will be 10 quarters and 2 pennies. But should be 10 quarters and 3 pennies. The issue is due to 1) amount *100 which will be 252.999 2) int that makes truncation. So it's better to use round here instead of int.

When we put 2.53, the result will be 10 quarters and 2 pennies. But should be 3 pennies. 
The issue is due to 1) amount *100 which will be 252.999 2) int that makes truncation. 
So it's better to use round here instead of int.
@tutelarix tutelarix changed the title Fixed issue with convertion. Fixed issue with conversion. Oct 18, 2022
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.

1 participant