Sum multiples of 3 and 5: Difference between revisions

→‎{{header|Python}}: Pretty patterns.
m (Paddy3118 moved page Multiplies of 3 and 5 to Sum multiples of 3 and 5: Correct spelling and make clear.)
(→‎{{header|Python}}: Pretty patterns.)
Line 66:
sa, sb, sc = sum35a(n), sum35b(n), sum35c(n)
assert sa == sb and sa == sc
 
print('For n = %i7i -> %i\n' % (n, sc))</lang>
 
# Pretty patterns
for p in range(7):
print('For n = %7i -> %i' % (10**p, sum35c(10**p)))</lang>
 
{{out}}
<pre>For n = 1000 -> 233168</pre>
 
For n = 1 -> 0
For n = 10 -> 23
For n = 100 -> 2318
For n = 1000 -> 233168
For n = 10000 -> 23331668
For n = 100000 -> 2333316668
For n = 1000000 -> 233333166668</pre>
 
=={{header|REXX}}==
Anonymous user