reset password
Author Message
Alex895i
Posts: 7
Posted 12:56 Feb 24, 2017 |

Are we supposed to round to 3 decimal places?

On the sample output it doesn't show that it was rounded to 3 decimal places

kknaur
Posts: 540
Posted 14:50 Feb 24, 2017 |

The sample output is not rounded, but your solution should be.

KA1997
Posts: 31
Posted 18:00 Feb 25, 2017 |

I'm having a hard time with that too. I did what I was supposed to do and it rounded it to 1 decimal place instead of 3.

kknaur
Posts: 540
Posted 18:04 Feb 25, 2017 |

Review the examples and the section from the book on using the .round() method.

KA1997
Posts: 31
Posted 18:45 Feb 25, 2017 |

I did. I put "Math.round((area*1000.0)/1000.0)" and it still returned an area rounded to 1 decimal place.

kknaur
Posts: 540
Posted 18:47 Feb 25, 2017 |

The division should be outside of the round method.

KA1997
Posts: 31
Posted 20:40 Feb 25, 2017 |

Oh thanks! Makes sense now!

Last edited by KA1997 at 20:40 Feb 25, 2017.