home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_02 / 125.jpg < prev   
Joint Photographic Experts Group Image  |  2014-01-08  |  664KB  |  2550x3300
Labels: book | crt screen | poster | reckoner
OCR: Exercises and Programming Problems 125 removed Validate that the user's input is positive. box Add loop to allow the user to continue to enter integers to be reversed The user will enter the value to terminate the program 20. Modify your solution to Programming Problem 16 from Chapter 1 to validate the user's input. Your program will need to validate that both integers are pos- itive aad distinct from each other. In addition, ppe loop so that the user can continue to generate Pythagorean triples. Your program should terminate when the user enters - as the first integer. 21. The greatest common divisor (gea) of two positive integers X and V can be determined as follows Step then the gcd is Step divide X by finding the remainder rl neter and Step not 0 divide by ~1 and find the remainder r2. ...