Jump to content

Proper divisors: Difference between revisions

m
→‎version 3: added whitespace.
m (→‎version 2: updated the output section.)
m (→‎version 3: added whitespace.)
Line 4,850:
<lang rexx>/*REXX program finds proper divisors (and count) of integer ranges; finds the max count.*/
parse arg bot top inc range xtra /*obtain optional arguments from the CL*/
if bot=='' | bot=="," then bot= 1 1 /*Not specified? Then use the default.*/
if top=='' | top=="," then top= 10 10 /* " " " " " " */
if inc=='' | inc=="," then inc= 1 1 /* " " " " " " */
if range=='' | range=="," then range=20000 20000 /* " " " " " " */
w= max( length(top), length(bot), length(range)) /*determine the biggest number of these*/
numeric digits max(9, w + 1) /*have enough digits for // operator.*/
Cookies help us deliver our services. By using our services, you agree to our use of cookies.