Menu

Add Topic

Forum

waiting answer January 20, 2021

Write a C Program to Find Area and Circumference of Circle.

Answers
January 20, 2021

Program Description: C program to find area and circumference of a circle

    #include<stdio.h>
    int main()
    {
        float const pi = 3.14;
        int radius;
        float area,ci;
        printf("Enter the radius of the circle:");
        scanf("%d",&radius);
        area=pi*radius*radius;
        printf("\nArea of circle is %f ",area);
        ci=2*pi*radius;
        printf("\ncircumference of the circle is =%f ",ci);
        return 0;
    }

OUTPUT

         Enter the radius of the circle:5

        Area of circle is 78.500000 
        circumference of the circle is =31.400002     

0 0

Please Login to Post the answer

Leave an Answer