Hey.. I'm having trouble achieving this in C++...(adsbygoogle = window.adsbygoogle || []).push({});

I'm trying to do an opperation but keeping only 2 decimals, and floor rounding.

((3.52 * 4.32)/3.26) + 2.34

So I have 3.52 * 4.32 = 15.2064, but then I just round to 15.20

then 15.20/3.26 = 4.662576687116, but then I just round to 4.66

... and so on...

anyone know how to achive this in C++, I've thought of the floor command but how do I see the precision to only 2 decimals?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Setting precision? C++

Loading...

Similar Threads for Setting precision | Date |
---|---|

JavaScript Help with setting up code folding in NetBeans 8.1 | Sep 30, 2016 |

C/++/# Algorithm to find the smallest substring containing a set of... | Aug 13, 2016 |

Setting up 3-D rotation in web page | Aug 11, 2016 |

Schema theorem for non binary sets? | Apr 10, 2016 |

Problem setting integer precision in Fortran | May 19, 2013 |

**Physics Forums - The Fusion of Science and Community**