#include <iostream>
using namespace std;

class Circle {
private:
        float radius;
public:
        Circle(int r){
            radius = (float)r;
        }
    float area(){
        float rad = radius * radius  * 3.14;
        return rad;
    }
};

int main() {
    Circle circle(3);

    cout << circle.area() <<endl;
    }

Embed on website

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