Programming logic C# visual studio
What are the values of the double variable x after each of thefollowing statements is executed?
- x = Math.Abs(7.5);
- x = Math.Floor(7.5);
- x = Math.Abs(0.0);
- x = Math.Ceiling(0.0);
- x = Math.Abs(-6.4);
- x = Math.Ceiling(-6.4);
- x = Math.Ceiling(-Math.Abs(-8 + Math.Floor(-5.5)));
Solution
x = Math.Abs(7.5); -> 7.5x = Math.Floor(7.5); -> 7x = Math.Abs(0.0); -> 0.0x = Math.Ceiling(0.0); -> 0x = Math.Abs(-6.4); -> 6.4x = Math.Ceiling(-6.4); -> -6x = Math.Ceiling(-Math.Abs(-8 + Math.Floor(-5.5))); -> -14
Please
OR
OR