What is wrong with code?
@mayank10 setprecision() do not prints the trailing zeroes if you call it simply.
use “fixed” to print trailing zeroes like these
cout<<fixed<<setprecision(2)<<x<<endl;
@mayank10 setprecision() do not prints the trailing zeroes if you call it simply.
use “fixed” to print trailing zeroes like these
cout<<fixed<<setprecision(2)<<x<<endl;