+ 1
Setprecision for equation
Is there a way I can setprecision for an equation? I'm using the discriminant formula and asking the user to input a number for a, b, and c for the equation d= b * b - 4 * a * c. I want it to setprecision to 2 decimal places but I don't how to for an equation.
1 Respuesta
+ 1
Krista Clark you need to set precision i.e. round to few decimals for concerned variables.. please go through below code for reference:
https://code.sololearn.com/cpaN4tJjP97N/?ref=app