WACP to find diameter, area and perimeter of a circle.

1 year ago
C Programming

/* program to find diameter, area and perimeter of a circle */ #include<stdio.h>

int main()

{

float radius, diameter, area, perimeter; printf(“Enter the radius\n”); scanf(“%f”,&radius);

diameter = 2 * radius;

area = 3.142 * radius * radius; perimeter = 2 * 3.142 * radius;

printf(“Diameter of circle = %f\n”,diameter); printf(“Area of circle = %f\n”,area); printf(“Perimeter of circle = %f\n”,perimeter); return 0;

}

Sanisha Maharjan
Jan 20, 2022
More related questions

Questions Bank

View all Questions

Top