How to store a decimal value up to 2 decimal places in another variable in C?
Suppose a
= 3.91900007534
.
In C language, I want to store the value of the variable a
in another variable, r
, up to two decimal places, such that r
= 3.92
.
Note that I don't want to print the value up to two decimal places, I just want to store the value as I need the exact value of r
for the next operation.
from Recent Questions - Stack Overflow https://ift.tt/3aWNddA
https://ift.tt/eA8V8J
Comments
Post a Comment