kindly share the code for rounding off a variable in the programme, say i want to round off to 3 digits
How can i round of a variable to some precison
you can use setprecision():
I don’t want to print I just want to store a variable in rounded off form
like say float var = 4.234; now I want to round off var
i don’t know any such function
i think it doesn’t exist because nos are stored according to its data type like (int,float,etc)
okay, even I couldn’t even find any such fn.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.