From: keho@quads.uchicago.edu (david kehoe)
Newsgroups: alt.astrology
Subject: Cabalistic numerology software
Date: 14 Apr 92 21:11:12 GMT
Reply-To: keho@midway.uchicago.edu
Organization: University of Chicago Computing Organizations

I just wrote a C program to do Cabalistic numerology (medieval
Jewish mysticism that tried to find hidden meanings of words
in scripture).  Interpretations are available in these books:

Montrose (1982), "Numerology For Everybody". New Delhi: Sagar Publications.

Cheiro (1988), "Cheiro's Book of Numbers". New York: Prentice Hall.

Goodman, Linda (1987), "Linda Goodman's Star Signs". New York: St. Martin's
Press.

To compile on UNIX, just cut where indicated, save the file as
"cabala.c" and then type:

cc -o cabala cabala.c

Run the program by typing "cabala".
BTW, this is my very first C program, so if anyone has any helpful
comments on coding style or anything, please let me know.

*** cut here ***
#include <stdio.h>

/* Cabalistic numerology: compound = fortune, single = personality. */

int c, temp, compound, single, hundreds, tens, ones;

SumDigits()	{
	hundreds = single/100;
	tens = single/10;
	ones = single - ( (single/10)*10 );
	single = hundreds + tens + ones;
}

main()
{
single = 0;
	
printf("Please enter your name.\n");
	
c = getchar();
	
while( c != 10 )	{
	
	while( (c != 32) && (c != 10) )	{
		switch(c)	{
			case 'a': case 'A':
				temp = 1;
				break;
			case 'b': case 'B':
				temp = 2;
				break;
			case 'c': case 'C':
				temp = 3;
				break;
			case 'd': case 'D':
				temp = 4;
				break;
			case 'e': case 'E':
				temp = 5;
				break;
			case 'f': case 'F':
				temp = 8;
				break;
			case 'g': case 'G':
				temp = 3;
				break;
			case 'h': case 'H':
				temp = 5;
				break;
			case 'i': case 'I':
				temp = 1;
				break;
			case 'j': case 'J':
				temp = 1;
				break;
			case 'k': case 'K':
				temp = 2;
				break;
			case 'l': case 'L':
				temp = 3;
				break;
			case 'm': case 'M':
				temp = 4;
				break;
			case 'n': case 'N':
				temp = 5;
				break;
			case 'o': case 'O':
				temp = 7;
				break;
			case 'p': case 'P':
				temp = 8;
				break;
			case 'q': case 'Q':
				temp = 1;
				break;
			case 'r': case 'R':
				temp = 2;
				break;
			case 's': case 'S':
				temp = 3;
				break;
			case 't': case 'T':
				temp = 4;
				break;
			case 'u': case 'U':
				temp = 6;
				break;
			case 'v': case 'V':
				temp = 6;
				break;
			case 'w': case 'W':
				temp = 6;
				break;
			case 'x': case 'X':
				temp = 5;
				break;
			case 'y': case 'Y':
				temp = 1;
				break;
			case 'z': case 'Z':
				temp = 7;
				break;
			default: {
				printf("Non-alphabetical character was ignored.\n"); 
				temp = 0;
				}
		}	/* end switch */
		
		single = single + temp;
		c = getchar();
			
	}	/* end ASCII-32 while loop */	
		
		while( (single > 9) && (single != 11) && (single != 22) )
			SumDigits();
	
		compound = compound + single;
		
		if (compound > 73)	{
			hundreds = compound/100;
			tens = compound/10;
			ones = compound - ( (compound/10)*10 );
			compound = hundreds + tens + ones;
			}
		
		single = 0;
		if(c != 10)
			c = getchar();
	
} /* end ASCII-10 while loop */

single = compound;
while(single > 9)
	SumDigits();
	
if(compound > 9)
	printf("Your compound number is %d.\n", compound);
else
	printf("Your name does not have a compound number.\n");
	
printf("Your single number is %d.\n", single);
}
*** cut here ***
-- 
"Why my thoughts are my own, when they are in, but when they are out
they are another's." - Susannah Martin, hanged for witchcraft, 1692.
Thomas David Kehoe    keho@midway.uchicago.edu    (312) 753-0119