write a program to accept the radius of a circle. Calculate and store the diameter, circumference and area of the circle display all the details under a heading
Answers
Answered by
1
Answer:-
#include
#include
void main()
{
int r,d,cir,area;
float pi=3.14;
printf(“enter the radius:”);
scanf(“%d”,&r);
d=2*r;
cir= 2*pi*r;
area=pi*r*r;
print(“Radius=%dDiameter=%d\nCircumference=%d\nArea=%d”,r,d,cir,area);
getch();
}
#include
#include
void main()
{
int r,d,cir,area;
float pi=3.14;
printf(“enter the radius:”);
scanf(“%d”,&r);
d=2*r;
cir= 2*pi*r;
area=pi*r*r;
print(“Radius=%dDiameter=%d\nCircumference=%d\nArea=%d”,r,d,cir,area);
getch();
}
Similar questions