Question: c++ 4. Look at the following code: int x = 5, y = 3, 2 = 7; int f = 3, 8 = 5; float
4. Look at the following code: int x = 5, y = 3, 2 = 7; int f = 3, 8 = 5; float d = -3 / 4 + 6 / 4; float w = (x / y) + (z / x); float q = f / g + 3 / 2; cout Obviously, the numbers are being truncated. Use your knowledge of casting to modify the above code so that the output looks like this: 0.75 3.06667 2.1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
