Please enable JavaScript to use CodeHS

AP CSA: CON-1.C.4

CodeHS Lessons

Values of type double can be rounded to the nearest integer by (int)(x + 0.5) or (int)(x – 0.5) for negative numbers.

6.6 Casting and Ranges of Variables
7.6 Casting and Ranges of Variables
1.6 Casting and Ranges of Variables