#include "geometrie.h"
#include <cmath>
#include <iostream>
#include <stdio.h>

using namespace std;

Geometrie::Geometrie()
{

}

void Geometrie::createCercle(int rayon){
    this->maforme = cercle;
    this->rayon = rayon;  // Initialisation du rayon
}

int Geometrie::aire(){
    int result = 0;
    if(this->maforme == cercle){
        result = M_PI * rayon * rayon;  // Utilisation du rayon
    }
    return result;
}

void Geometrie::toString(){
    if(this->maforme==cercle){
        cout<<"Cet objet geometrie est un cercle de rayon : "<<this->aire()<<endl;
    }
}

Add a code snippet to your website: www.paste.org