正在加载图片...
class rectangle public shape float length, width i public rectangle(float 1, float w) void maint i length= i shape *sp width=w sp=new circle() cout<<"The area of the circle is l rectangle()( y <<sp->getarea()<<endl float getareao) cout<<The perimeter of the circle is i return length*width, 3 <<sp->getperim()<<endl float getperim() delete sp i return 2*length+2*width private sp=new rectangle(4, 6) cout<< The area of the rectangle is <<sp->getarea()<<endl; cout<< The perimeter of the rectangle is <<sp->getperim()<<endl delete sp
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有