C program to find circumference and area of circle
#include<stdio.h>
#include<conio.h>
void main()
{
int r;
float area,circum;
clrscr();
printf("Enter the radius of a circle:");
scanf("%d",&r);
area=3.14*r*r;
printf("\nThe area of a circle is:%f",area);
circum=2*3.14*r; // formula
printf("\n The Circumference of a circle is:%f",circum);
getch();
}
0 Comments:
Post a Comment