11.3: Accessing Structure Members: 11002

Question

The "origin" of the cartesian plane in math is the point where x and y are both zero. Given a variable, origin of type Point-- a structured type with two fields, x and y, both of type double, write one or two statements that make this variable's field's values consistent with the mathematical notion of "origin".

Solution
origin.x=0.0;
origin.y=0.0;

No comments:

Post a Comment