#include <iostream>
#include <locale.h>
using namespace std;
class rectangle{
public :
double width;
double height;
double get_area();
double get_perimeter();
};
double rectangle::get_area(){
return width*height;
}
double rectangle::get_perimeter(){
return 2*(width+height);
}
int main0201(){
setlocale(LC_ALL,"Turkish");
rectangle r;
r.width=4;
r.height=5;
double a=r.get_area();
cout<<"Alan : "<<a<<"\n";
double p=r.get_perimeter();
cout<<"�evre : "<<p<<"\n";
return 0;
}
Dosyayı İndir