Write a C program to find area and perimeter of circle.
Answers
Answered by
62
#include<stdio.h>
int main() {
int rad;
float PI = 3.14, area, ci;
printf("\nEnter radius of circle: ");
scanf("%d", &rad);
area = PI * rad * rad;
printf("\nArea of circle : %f ", area);
ci = 2 * PI * rad;
printf("\nCircumference : %f ", ci);
return (0);
}
Answered by
1
#include<constream.h>
void main ();
{
clrscr();
float area, r, cir;
cout<<"\nEnter radius";
cin>>r;
area=3.14*r*r;
cir=2*3.14*r;
cout<<"\nArea="<<area;
cout<<"\ncircumference="<<cir;
getch();
}
Similar questions