Actualiser exo2/main.c

This commit is contained in:
bastien 2025-05-12 08:17:47 +00:00
parent 58ec377c72
commit 02a70c1480

View File

@ -212,7 +212,7 @@ float surfacePentagoneRegulier(float cote) {
return (5.0 / 4.0) * cote * cote * (1.0 / tan(PI / 5.0)); return (5.0 / 4.0) * cote * cote * (1.0 / tan(PI / 5.0));
} }
int surfaceHexagoneRegulier(float cote) { // Erreur de type 5: retourne int au lieu de float int surfaceHexagoneRegulier(float cote) {
// Formule: (3√3/2) * cote² // Formule: (3√3/2) * cote²
return (3.0 * sqrt(3.0) / 2.0) * cote * cote; return (3.0 * sqrt(3.0) / 2.0) * cote * cote;
} }