AIM:- How to Find Area of  Circle and Cylinder Program Using programming c

Input:-

#include<stdio.h>

int main()

{

    float pie=3.14,radius,height,area,volume;

    

    printf(“Calculate Area of Circle”);

    printf(“\n\n”);

    printf(“Enter the value of Radius : “);

    scanf(“%f”,&radius);

    area = pie*radius*radius;

    printf(“\n”);

    printf(“Area of Circle : %f”,area);

    printf(“\n\n”);

    printf(“Calculate Volume of Cylinder”);

    printf(“\n\n”);

    printf(“Enter the value of Radius : “);

    scanf(“%f”,&radius);

    printf(“Enter the value of Height : “);

    scanf(“%f”,&height);

    volume = pie*radius*radius*height;

    printf(“\n\n”);

    printf(“Area of Circle : %f”,area);

    

    return 0;

}

Output:-

Calculate Area of Circle

Enter the value of Radius : 5

Area of Circle : 78.500000

Calculate Volume of Cylinder

Enter the value of Radius : 3

Enter the value of Height : 3

Area of Circle : 78.500000

Advertisements