home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_11 / 616.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-19  |  594KB  |  2550x3300
Labels: binder | book | crt screen | poster | reckoner | screen
OCR: 616 Chapter Library and Preprocessor Facilities return 0 get c coord() double get cocrd( char char buffer[BUF SIZE]; printf( "Enter the %3 value: ); fgets( buffer BUF SIZE stdir re turn strtod( buffer, char NULL Note to polar() struct polar 02 polar struct cartesian *cart static struct polar double temp pow( cart->x, pow cart- ->y,2 Note p radius sart temp Note angle atan2 cart cart->x Note ang le angle return &p The program consists of the three functions main, get C coord and to pol ar() The function get c coord() takes care of input. value entered as string Jo characters, and is converted to type double and returned. The function to po lar() takes pointer to a struct and returns a pointer to truct polar that contains the polar coordinates of the point every pass through its while loop, ...