create a rectangle and find its area=w*h.create another rectangle with width and height as twice as the first rectangle and find its area using friend function in c++
I'm quite sure that the people who help others here do not complete another persons homework for them.
I suggest you post what you have tried, with a little explanation of it.
I'd break this up into manageable pieces:
Post some work/idea of yours.
Here's the pseudocode.
class Rectangle int height, width public Rectangle(initial_height, initial_width) height=initial_height width=initial_width end_Rectangle getArea() getArea=height*width end_getArea end_class main height=input height width=input width Rectangle rt(height, width) print Area=rt.getArea end_main