0

Please give me an answer.

A point on the two dimensional plane can be represented by two numbers: an x coordinate and a y coordinate.The sum of two points can be defined as a new point whose x coordinate is the sum of the x coordinates of the two points, and whose y coordinate is the sum of the y coordinates.Write a program that uses a structure called point to model a point.Define three points and have the user input values to two of them.

12th Jan 2017, 4:56 AM
Pyae Shan
Pyae Shan - avatar
2 Antworten
+ 3
Homework, sweet homework :P
12th Jan 2017, 5:19 AM
visph
visph - avatar
+ 2
Before I give you any straight answer, I have to ask you a question. Do you actually want to study and understand the code I give you, or are you just going to take the code and never do anything with it again? If you're actually interested in studying the code for the program, I won't make it easy on you by dropping all the source code onto the page. Instead, I'll use pseudocode to tell you what you ought to do. If you just want me to dump the code here so you can use it once and forget about it later... let's just say I'm not feeling charitable. Sorry.
12th Jan 2017, 5:43 AM
DaemonThread
DaemonThread - avatar