Tam giác Reuleaux: giao của 3 cung tròn tâm tại đỉnh tam giác đều cạnh h.
Diện tích: S = (π - √3) × h² / 2
Chương trình
#include <iostream>
#include <cmath>
using namespace std;
float reuleauxArea(float h) {
if (h < 0) return -1;
return (3.1415 - sqrt(3)) * h * h / 2;
}
int main() {
float h = 6;
cout << "Dien tich Reuleaux: " << reuleauxArea(h);
return 0;
}
Kết quả
Dien tich Reuleaux: 25.3701