Class 9th CBSE

Write a C program to enter radius of a circle and find its diameter, circumference and area.


Write a C program to enter radius of a circle and find its diameter circumference and area.

Write a C program to enter radius of a circle and find its diameter circumference and area.

Solution  :- 

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int radius;
float pi = 3.14,cir,dia,area;
printf(“Enter the Radius of a Circle :- “);
scanf(“%d”,&radius);
dia = 2*radius;
cir = 2*pi*radius;
area = pi * radius * radius;
printf(“\nThe Diameter of a Circle is :- %.2f”,dia);
printf(“\nThe Circumference of a Circle is :- %.2f”,cir);
printf(“\nThe Area of a Circle is :- %.2f”,area);
getch();
}

Solution :- 

 

Output :- 

 

Fun & Easy to follow
Works on all devices
Your own Pace
Super Affordable

Popular Videos

Play Video

UX for Teams

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer

Play Video

SEO & Instagram

Learn the basics and a bit beyond to improve your backend dev skills.

ava4.png
Chris Matthews

Designer