#include <stdio.h>
#define PI 3.14159 // Định nghĩa hằng số PI
int main() {
float radius; // Biến để lưu bán kính
float area; // Biến để lưu diện tích
// Yêu cầu người dùng nhập bán kính
printf("Enter the radius of the circle: ");
// Tính diện tích của hình tròn
area = PI * radius * radius;
// Hiển thị diện tích
printf("The area of the circle with radius %.2f is %.2f\n", radius
, area
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgojZGVmaW5lIFBJIDMuMTQxNTkgIC8vIMSQ4buLbmggbmdoxKlhIGjhurFuZyBz4buRIFBJCgppbnQgbWFpbigpIHsKICAgIGZsb2F0IHJhZGl1czsgIC8vIEJp4bq/biDEkeG7gyBsxrB1IGLDoW4ga8OtbmgKICAgIGZsb2F0IGFyZWE7ICAgIC8vIEJp4bq/biDEkeG7gyBsxrB1IGRp4buHbiB0w61jaAoKICAgIC8vIFnDqnUgY+G6p3UgbmfGsOG7nWkgZMO5bmcgbmjhuq1wIGLDoW4ga8OtbmgKICAgIHByaW50ZigiRW50ZXIgdGhlIHJhZGl1cyBvZiB0aGUgY2lyY2xlOiAiKTsKICAgIHNjYW5mKCIlZiIsICZyYWRpdXMpOwoKICAgIC8vIFTDrW5oIGRp4buHbiB0w61jaCBj4bunYSBow6xuaCB0csOybgogICAgYXJlYSA9IFBJICogcmFkaXVzICogcmFkaXVzOwoKICAgIC8vIEhp4buDbiB0aOG7iyBkaeG7h24gdMOtY2gKICAgIHByaW50ZigiVGhlIGFyZWEgb2YgdGhlIGNpcmNsZSB3aXRoIHJhZGl1cyAlLjJmIGlzICUuMmZcbiIsIHJhZGl1cywgYXJlYSk7CgogICAgcmV0dXJuIDA7Cn0=