Munchausen numbers: Difference between revisions

Content added Content deleted
(Added Algol W)
m (→‎{{header|ALGOL W}}: Fixed typos in comments)
Line 125: Line 125:
=={{header|ALGOL W}}==
=={{header|ALGOL W}}==
{{Trans|ALGOL 68}}
{{Trans|ALGOL 68}}
<lang algolw>% endnd Munchausen Numbers between 1 and 5000 %
<lang algolw>% Find Munchausen Numbers between 1 and 5000 %
% note that 6^6 is 46 656 so we only need to cosider numbers consisting of 0 to 5 %
% note that 6^6 is 46 656 so we only need to consider numbers consisting of 0 to 5 %
begin
begin
% table of nthPowers - note 0^0 is 0 for Munchausen numbers, not 1 %
% table of nth Powers - note 0^0 is 0 for Munchausen numbers, not 1 %
integer array nthPower( 0 :: 5 );
integer array nthPower( 0 :: 5 );
integer d1, d2, d3, d4, d1Part, d2Part, d3Part;
integer d1, d2, d3, d4, d1Part, d2Part, d3Part;