home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_07 / 413.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-21  |  530KB  |  2550x3300
Labels: binder | book | crt screen | reckoner | screen
OCR: Enumerated Types 413 a close Inc] lude Files tincl lude <stdio h> #incl lude <stdlib h> Cons tant Definiti ons rees #define BUF SIZE 80 No vari- Type Descripti ions enum boolean false, true Note 1 alues in int main( void vith the Note 2 enum bool ean prime; int num, divi isor; char inarray [BUF SIZEl; printf( "Enter positive integer to be tested: fgets inarray, BUF SIZE, stdin identi- num atoi( inarray has the defi- num The pr. nt that number wasn t pos itive \n" exi and colors prime true; Note 3 and printf( "List of divisors: F com ample for divi .sor divisor num; divis sor++ olean num divi sor intf div re for prime false, Note 4 num printf td\n" num else pr ime false, Note 5 if prime Note 6 pr. intf( ned is pr ime number n" num return lse tinclude alue tive intece retuirn