RosettaCodeData/Task/Formatted-numeric-output/Ring/formatted-numeric-output.ring
2016-12-05 23:44:36 +01:00

8 lines
163 B
Text

decimals(3)
see fixedprint(7.125, 5) + nl
func fixedprint num, digs
for i = 1 to digs - len(string(floor(num)))
see "0"
next
see num + nl