Show a specific number of decimals in floating point numbers in Lua language

Asked

Viewed 2,162 times

2

I started to learn a little about the language Lua and I’m doing some algorithms to practice and one of them I should show in the output of floating point values with 4 decimal places. In C++ I would use cout << fixed << setprecision(4);, I searched a lot and did not find a way in the language Moon.

1 answer

2


  • That’s right, it worked. Thank you very much! =]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.