3

#include <iostream>
using namespace std;
class Rectgangle{
	private:
		int length;
		int width;
	public:
		void js(int l,int w){		
			length=l;
			width=w;
		}
		void sj(){
			cout<<"周长是:"<<(length+width)*2<<endl;
			cout<<"面积是:"<<length*width;
		}		
};
int main(){
	Rectgangle a;
	a.js(10,20);
	a.sj(); 
	return 0;
}

  

posted @ 2025-02-23 09:58  最后一个还有我  阅读(16)  评论(0)    收藏  举报