//Area & the Circumference of circle
#include<stdio.h>
#include<conio.h>
void main()
{
int r, p=3.14;
float cir,area;
clrscr();
printf("\nEnter the radius of the circle");
scanf("%d",&r);
cir=2*p*r;
area=p*r*r;
printf("\nThe Circumference of the circle is=%f",cir);
printf("\nThe area of the circle is=%f",area);
getch();
}
Hope you liked my posts, give comments if you have any doubts.. :)#include<stdio.h>
#include<conio.h>
void main()
{
int r, p=3.14;
float cir,area;
clrscr();
printf("\nEnter the radius of the circle");
scanf("%d",&r);
cir=2*p*r;
area=p*r*r;
printf("\nThe Circumference of the circle is=%f",cir);
printf("\nThe area of the circle is=%f",area);
getch();
}
0 comments:
Post a Comment