Computer Science, asked by debarghadas2020, 8 months ago

What will be the value of d if d is a float after the operation d = 2 / 7.0?

Answers

Answered by mahakincsem
0

The output would be 2.857143

Explanation:

Floating values is a datatype in different programming languages which is used to represent floating numbers up to 6 digits of precision.

Such as if we divide 2/0.7. We get,

2/ 0.2 = 2.8571428571

But we will round it off and keep value up to 6 digits of precision. Such that the output would be 2.857143 because the digit after 2 is 8 which is greater than 5 so 2 becomes 3

Similar questions