COMP 1000 Lecture Notes - Lecture 3: Negative Number, Winzip
Document Summary
Assignment 3: write a program that asks the user to enter two floating-point values x and y of type double. This program then should display on the screen the value of the following expression: 10 i: write a program that reads from the user a sequence of points pi with coordinates (xi, yi, zi) and prints the coordinates of the point pi farthest from the origin (0, 0, 0). The user may enter as many points as he/she wants or enter the coordinates of the origin to exit. Hint: distance between two points p(x,y,z) and pi(xi, yi, zi) = (x xi)2 + (y yi)2 + (z zi)2. Enter (0, 0, 0) to exit or enter the coordinates of p1: 5. 4 3. 2 4. 7. Enter (0, 0, 0) to exit or enter the coordinates of p2: 3. 4 5. 4 7. 5. Enter (0, 0, 0) to exit or enter the coordinates of p3: 5 7 12. 1.