C++ tasks

Hello!
I have two C++ tasks, i can`t manage to do, because my C++ game is yet not strong enough.
If you can, please help!

1. Row a(1..n) is called saw-type if any three adjacent elements maintain either a(1-a)<a(i)>a(a+1) or a(i-1)>a(i)<a(a+1).

So the task: There is given massive A(m). Determine the longest saw-type row in this massive. Create and use function that determines saw-type row length in massive, that begins with element with index i.

--------------------------------------------------------------------------------

2. Create class "Point", in which there are two numbers - point coordinates. For class create such methods: (1) Constructor, with which beginning values are delivered, (2) destructor, that announces objects liquidation, (3) method "Change" with two parameters , which change point coordinate values for the given quantity (not replace but change), (4) method "Print", that prints on screen the given point coordinates, (5) method "Distance" with two arguments - different point coordinates, that prints distance between these two points.
These are not beginner level assignments. Surely you can at least start them and post your attempt...
Topic archived. No new replies allowed.