Anonymous user
Babbage problem: Difference between revisions
m
→{{header|REXX}}: added wording to the REXX section header (preamble), pruned the last two outputs (saying that they're identical to the first).
m (improved alignment) |
m (→{{header|REXX}}: added wording to the REXX section header (preamble), pruned the last two outputs (saying that they're identical to the first).) |
||
Line 162:
=={{header|REXX}}==
If this were a computer program to be shown to a
<br>intelligent polymath novice), the computer program would also have a <big>''lot''</big> more comments,
<br>notes, and accompanying verbiage which would/could/should explain:
:::* what a (computer program) comment looks like
:::* what
:::* what a computer program is
:* how the '''do''' loop works (initial value, increment, etc)▼
:::* how
:::*
:::* how
:::*
:::*
:::*
:::* what
:::* what
:::*
:::*
:::*
:::*
:::* how/when the '''then''' cause gets executed (after an '''if''')
:::* explain how/why an '''end''' statement is needed for a '''do''' loop
▲:::* explain how
:::* <big>···</big> the '''say''' is problem the only statement that is self-explanatory
===examine the right-most 6 digits of square===
<lang rexx>/*REXX program finds the lowest (positive) integer whose square ends in 269,696. */
Line 200 ⟶ 206:
say "The smallest integer whose square ends in 269,696 is: " j</lang>
'''output''' is identical as the 1<sup>st</sup> REXX version.
===examine only numbers ending in 4 or 6===
Line 219 ⟶ 222:
say "The smallest integer whose square ends in 269,696 is: " k</lang>
'''output''' is identical as the 1<sup>st</sup> REXX version.
<
=={{header|Ruby}}==
|