6 ms·
How does the divisible-by-five case suppress the numeral output, when `i%3` is nonzero?
by AlexCoventry 9y ago
How does the divisible-by-five case suppress the numeral output, when `i%3` is nonzero?
- vidarh 9y agoThe "\r" in the format string for the number is carriage return. It ensures that as long as you print to terminal rather than redirect to file etc., the number gets overwritten if anything else gets printed on the same line.
- AlexCoventry 9y agoAh, thank you.