C++ not rounding as it should when using both cout and printf
I need to make a program that calculates cos(x) and my problem is that when I use printf for example cos(0.2) is 0.98 but it comes out as 0.984 and it’s not rounding to 2 numbers. My code: #include &…