C Program To Calculate Area Of Circle

In this example, we will calculate area of circle based on user input.

Calculate Area Of Circle In C Programming


int main() {
    float radius, area;

    printf("\nEnter the radius of Circle : ");
    scanf("%f", &radius);

    area = 3.14 * radius * radius;
    printf("\nArea of Circle : %.2f", area);

    return (0);

Output :

Enter the radius of Circle : 10
Area of Circle : 314.00

Share your thoughts

Ask anything about this examples