标签:
#include<iostream.h> class rectangel{ public: rectangel(int l,int w){ length = l; width = w; } int area(); private : int length; int width; }; int rectangel::area(){ return length* width; } int main() { rectangel a(3,4); cout<<"长方形面积:"<<a.area()<<endl; return 0; }
标签:
原文地址:http://www.cnblogs.com/aicpcode/p/4264797.html