/*bignumwords.c - print the English words representing any given number from 0 to 999,999. Copyright (c) 1998 by Matthew Belmonte.*/ /*print the word that represents the given number in [0,999999]*/ static void print_num(n) long n; { if(n >= 1000L) { print_hundreds((int)(n/1000L)); printf(" thousand "); n %= 1000L; if(n != 0L) print_hundreds((int)n); } else if(n == 0L) printf("zero"); else print_hundreds((int)n); printf("\n"); }

Next slide