السلام عليكم :
انا حليت هذا السؤال على قانون مساحة المربع بس ما اعرفت اكمله ومو متاكده منه الرجاء المساعدة ولكم جزيل الشكر :
القانون : طول الضلع * طول الضلع
#include<iostream>
using namespace std;
class Square
{
private:
double along ;
public:
Square() {along = 0.0;}
Square(int r);
void along (double r){along = r;}
double along(){ return along * along * along;}
double getArea();
};
Square::Square(int r)
{
Along = r;
}
double Square::getArea()
{
return Along * Along * Along ;
}
int main()
{
int s;
Square c(7);
Square *cp1 = &c;
Square*cp2 = new Square(7);
}
الرجاء المساعدة لمن يستطيع الحل وشكرا لكم
:hmm:
