Cover V02, I04
Article
Figure 1
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6

jul93.tar


Listing 1: cdr.c

/*  Program cdr.c */

#include <stdio.h>
#include <ctype.h>

main()

{

char ch;
int offset;

do {
ch = getchar();
if (isupper(ch))
ch = tolower(ch);
else {
if (islower(ch))
ch = toupper(ch);
} /* end else */
if (ch <= 79 && ch >= 33) {
offset = 79 - ch + 1;
ch = 79 + offset;
} /* end then */
else {
if (ch >= 80 && ch <= 126) {
offset = ch - 80 + 1;
ch = 80 - offset;
} /* end then */
} /* end else */
if (ch != 0xff)
putchar(ch);
} while (!feof(stdin));

} /* end main */

/* end program cdr.c */