| changeset 894 | 4d5058706f1b |
| parent 893 | 908e4f6cdf7c |
| child 895 | 550676e542d2 |
--- a/solution/cw2/factors.while Fri Oct 28 09:08:13 2022 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -// Find all factors of a given input number -// by J.R. Cordy August 2005 - -write "Input n please"; -read n; -write "The factors of n are\n"; -f := 2; -while n != 1 do { - while (n / f) * f == n do { - write f; write "\n"; - n := n / f - }; - f := f + 1 -} \ No newline at end of file