Check what you learned about operators, operator order and division.
1. What is the value of 4 + 6 / 3?
4 + 6 / 3
3.33333
6
3
2
2. What is the value of (4 + 6) / 3, with whole numbers?
(4 + 6) / 3
4
3. What is the value of 7 / 2?
7 / 2
3.5
1
4. Which of these give 3.5?
7 % 2
7.0 / 2
7 / 2.0
5. What is the value of 17 % 5?
17 % 5
6. After double d = 9 / 2;, what does std::cout << d; print?
double d = 9 / 2;
std::cout << d;
5
4.5
d
double
9 / 2
7. Which type holds numbers with a decimal part, like 2.5?
2.5