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

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations