Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

encrypted jokes

546 views
Skip to first unread message

utcsrgv!dave

unread,
Oct 8, 1982, 10:34:47 AM10/8/82
to
For those who are complaning they can't read shifted jokes, here is
the thirty-seconds' worth of code to read it:
====================================================
#include <stdio.h>
#define SHIFT 13
char fix();
main()
{
char c;
while((c=getchar()) != EOF)
putchar(fix(c));
}
char fix(c)
char c;
{
if(c >= 'a' && c <= 'z')
{
c -= SHIFT;
if(c < 'a')
c += 26;
}
if(c >= 'A' && c <= 'Z')
{
c -= SHIFT;
if(c < 'A')
c += 26;
}
return(c);
}
====================================================
0 new messages