tested June 7, 2023 by chebby Uncategorized and debugged. The first two programs should also be fully commented