Smallest power of 6 whose decimal expansion contains n: Difference between revisions
Content added Content deleted
(→{{header|REXX}}: added the computer programming language REXX.) |
m (→{{header|REXX}}: changed a comment.) |
||
Line 6: | Line 6: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
<lang rexx>/*REXX pgm finds the smallest (decimal) power of 6 which contains N, where N < 22. */ |
<lang rexx>/*REXX pgm finds the smallest (decimal) power of 6 which contains N, where N < 22. */ |
||
numeric digits 100 /*ensure enough decimal digs for |
numeric digits 100 /*ensure enough decimal digs for 6**N */ |
||
parse arg hi . /*obtain optional argument from the CL.*/ |
parse arg hi . /*obtain optional argument from the CL.*/ |
||
if hi=='' | hi=="," then hi= 22 /*Not specified? Then use the default.*/ |
if hi=='' | hi=="," then hi= 22 /*Not specified? Then use the default.*/ |