149k views
4 votes
What will you see on the next line?

>>> int(19.725)

2 Answers

3 votes

Answer:

20

Step-by-step explanation:

19.725 rounded is 20

User Jostein Stuhaug
by
3.7k points
5 votes

Answer:

In the next line, you would see the value 19

Step-by-step explanation:

This is because in the C++ programming language the int() function being used in this question takes a double value as an argument and rounds it down to the nearest whole number. Therefore, since in this scenario the argument being passed is 19.725, if we round it down to the nearest whole number we would get 19. The int() function does this and returns the value 19 in the next line.

User VitalyP
by
3.5k points