#include <iostream>
using namespace std;

class Rectangle {
private:
        int height;
        int width;
public:
        Rectangle(int h ,int w){
            height = h;
            width = w;
        };
    float area(){
        float area = width * height;
        return area;
    }
    float perimeter(){
        float per = 2 * (width + height);
        return per;
    };
};

int main() {
    Rectangle rectangle(3,5);


    cout << rectangle.area() <<endl;
    cout << rectangle.perimeter() <<endl;
    }

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: