home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_12 / 690.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  538KB  |  2550x3300
Labels: book | crt screen | reckoner | sky
OCR: 690 Chapter Discovering C++ POSTCONDIT ON: The return value is the distance of from the origin int main) Point pi, p2 Note2 set Note set Note4 cout "Point pj disp lay Note p2 set Note p2 set Note cout and Point is p2 di isplay Note5 cout >> endl; cout "The dist ance of Point from the origin distance from origin( p < endl Note 3 cout "The distance of Point from the ori igin ie distance from_ origin( p2 endl; Note3 return 0; distance from origin() **** double distance from or iqin( Point Note and Note 5 return sqrt P.x_is +p .X is p.y is *p.y is Running the Program Point 0,0 and Point is 34 The dist ance of Point from the Or The distance of Point From the origin This file contains two functions. the function ma in) and top- -level func- tion named dist ance from or gin(. In this example we w ...