Sum of the digits of n is substring of n: Difference between revisions
Sum of the digits of n is substring of n (view source)
Revision as of 18:20, 15 June 2021
, 3 years ago→{{header|ALGOL W}}: spell isContained properly...
m (added whitespace and highlighting, added related tasks.) |
(→{{header|ALGOL W}}: spell isContained properly...) |
||
Line 261:
else begin
integer tPower, v, u;
logical
% find the lowest power of 10 that is greater then t %
tPower := 10;
Line 269:
v := v div 10
end while_v_gt_9 ;
v := abs t;
u := abs s;
while not
u := u div 10
end
end containsDigits ;
% find and show the matching numbers up to 1000 %
|