C Program to Calculate Area of an Ellipse

#include<stdio.h>
#define PI 3.141592

int main()
{
    float major, minor, area;

    /* Reading length of major axis */
    printf("Enter length of major axis: ");
    scanf("%f", &major);

    /* Reading length of minor axis */
    printf("Enter length of minor axis: ");
    scanf("%f", &minor);

    /* Calculating area of an ellipse */
    area = PI * major * minor;

    /* Displaying result */
    printf("Area of an ellipse = %0.4f", area);

    return 0;
}

Output

 

Enter length of major axis: 8
Enter length of minor axis: 4
Area of an ellipse = 100.5309

Leave a Reply

Your email address will not be published. Required fields are marked *

https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
About
Products
Subscribe

If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

    Applauz

    As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

    Subscribe

    If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

      Applauz

      As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

      Copyright by BOLD THEMES. All rights reserved.