Colorful numbers: Difference between revisions

Content added Content deleted
(→‎{{header|Julia}}: Now complete.)
(→‎{{header|Wren}}: Corrected what was probably a pasting error.)
Line 710: Line 710:
var pow = 10
var pow = 10
for (dc in 1...count.count) {
for (dc in 1...count.count) {
Fmt.print(" $d digit colorful number count: $,6d - $7.3f\%", dc, count[dc], 10 * count[dc] / pow)
Fmt.print(" $d digit colorful number count: $,6d - $7.3f\%", dc, count[dc], 100 * count[dc] / pow)
pow = (pow == 10) ? 90 : pow * 10
pow = (pow == 10) ? 90 : pow * 10
}
}