定義三角形類,包括3個數劇成員a,b,c爲三邊,經過成員函數計算周長和麪積

#include<iostream> #include<cmath> using namespace std; class s { float a,b,c; public: void gets(); void countc() { cout<<"三角形周長爲:"; cout<<(a+b+c)<<endl; } void counts(); }; void s::counts() {  float
相關文章
相關標籤/搜索