Skip to content

2.6 Operations - add int rounding #2

@tomiam8

Description

@tomiam8

Add description explaining how integers divided will be rounded, producing an integer.
E.g. 3/2 = 1.5 but gives 1
The example System.out.println(2*(5+(3/2)); needs an extra ending bracket.
Add that it mathematically should produce 13, but gives 12 (because of rounding)
Add that you can add .0 to make it a double and produce a nice double.

(tagged as bag because currently explanation is severely wrong, both by saying example gives 13 when it gives 12, and by not covering a significant part of Operations)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions