Format/typo check 1994/imc
This commit is contained in:
1 parent
0df21af4c4
commit
ac6af6730d
1 file changed
+9
-9
+9
-9
@@ -37,16 +37,16 @@ This program may be compiled with an ANSI or K&R compiler. A few
|
|||||||
harmless warnings are displayed only if `gcc -Wall` is used.
|
harmless warnings are displayed only if `gcc -Wall` is used.
|
||||||
|
|
||||||
This entry is really a set of library functions, but an example
|
This entry is really a set of library functions, but an example
|
||||||
main function has been added so that the library can be tested. If
|
`main()` function has been added so that the library can be tested. If
|
||||||
the program appears too large, consider that functions `o` and `s` can
|
the program appears too large, consider that functions `o()` and `s()` can
|
||||||
each be separated from the rest of the program (except for the short
|
each be separated from the rest of the program (except for the short
|
||||||
functions `p` and `r`, which they require) and used alone. However, the
|
functions `p()` and `r()`, which they require) and used alone. However, the
|
||||||
main part of the program is the function `e`, which does require all the
|
main part of the program is the function `e`, which does require all the
|
||||||
other functions (apart from `main`).
|
other functions (apart from `main()`).
|
||||||
|
|
||||||
The program should be supplied with an integer parameter. If no
|
The program should be supplied with an integer parameter. If no
|
||||||
parameter or an invalid parameter is given, then 5 is assumed. The
|
parameter or an invalid parameter is given, then 5 is assumed. The
|
||||||
maximum parameter is determined only by the amount of cpu time, virtual
|
maximum parameter is determined only by the amount of CPU time, virtual
|
||||||
memory and display (or file) space available.
|
memory and display (or file) space available.
|
||||||
|
|
||||||
### SPOILER:
|
### SPOILER:
|
||||||
@@ -55,13 +55,13 @@ OK, so you have probably seen magic square printers before. But what
|
|||||||
about one that deals with even sizes as well as odd ones, or one that
|
about one that deals with even sizes as well as odd ones, or one that
|
||||||
prints out a different one each time (or attempts to, at any rate)?
|
prints out a different one each time (or attempts to, at any rate)?
|
||||||
|
|
||||||
I have formatted the important functions `o`, `s` and `e` to show how useful
|
I have formatted the important functions `o()`, `s()` and `e()` to show how useful
|
||||||
the word "for" is, and (in function `e`) how useful the words "if" and
|
the word `for` is, and (in function `e()`) how useful the words `if` and
|
||||||
"else" are. In fact, hardly anything happens that isn't in one of these
|
`else` are. In fact, hardly anything happens that isn't in one of these
|
||||||
instructions. I did this in order to simplify the code - the algorithms
|
instructions. I did this in order to simplify the code - the algorithms
|
||||||
used to make the random squares are quite complex without being shrouded
|
used to make the random squares are quite complex without being shrouded
|
||||||
in obfuscated code! :-) Incidentally, I was surprised to find out how
|
in obfuscated code! :-) Incidentally, I was surprised to find out how
|
||||||
useful the exclusive-or operator was while writing function `s`.
|
useful the exclusive-or operator was while writing function `s()`.
|
||||||
|
|
||||||
Here are the descriptions of the functions in the library:
|
Here are the descriptions of the functions in the library:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user