|
|
Line 5,037: |
Line 5,037: |
|
|
|
|
|
See [[#Polyglot:PL/I and PL/M]] |
|
See [[#Polyglot:PL/I and PL/M]] |
|
|
|
|
⚫ |
=={{header|Plain English}}== |
|
⚫ |
<lang plainenglish>To run: |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
To show the factors of a number: |
|
⚫ |
Write "The factors of " then the number then ":" on the console. |
|
⚫ |
Find a square root of the number. |
|
⚫ |
|
|
⚫ |
If a counter is past the square root, write "" on the console; exit. |
|
⚫ |
Divide the number by the counter giving a quotient and a remainder. |
|
⚫ |
If the remainder is 0, show the counter and the quotient. |
|
⚫ |
|
|
|
|
|
⚫ |
|
|
|
|
|
⚫ |
To show a factor and another factor: |
|
⚫ |
If the factor is not the other factor, write "" then the factor then " " then the other factor then " " on the console without advancing; exit. |
|
⚫ |
Write "" then the factor on the console without advancing.</lang> |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
|
|
|
|
=={{header|Polyglot:PL/I and PL/M}}== |
|
=={{header|Polyglot:PL/I and PL/M}}== |
Line 5,100: |
Line 5,133: |
|
FACTORS OF: 99: 1 3 9 11 33 99 |
|
FACTORS OF: 99: 1 3 9 11 33 99 |
|
FACTORS OF: 100: 1 2 4 5 10 20 25 50 100 |
|
FACTORS OF: 100: 1 2 4 5 10 20 25 50 100 |
⚫ |
|
|
|
|
|
⚫ |
=={{header|Plain English}}== |
|
⚫ |
<lang plainenglish>To run: |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
To show the factors of a number: |
|
⚫ |
Write "The factors of " then the number then ":" on the console. |
|
⚫ |
Find a square root of the number. |
|
⚫ |
|
|
⚫ |
If a counter is past the square root, write "" on the console; exit. |
|
⚫ |
Divide the number by the counter giving a quotient and a remainder. |
|
⚫ |
If the remainder is 0, show the counter and the quotient. |
|
⚫ |
|
|
|
|
|
⚫ |
|
|
|
|
|
⚫ |
To show a factor and another factor: |
|
⚫ |
If the factor is not the other factor, write "" then the factor then " " then the other factor then " " on the console without advancing; exit. |
|
⚫ |
Write "" then the factor on the console without advancing.</lang> |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
|
</pre> |
|
</pre> |
|
|
|
|