Problem Statement
Write a C program which reads the radius of a circle and finds out the area of the circle.
#include<stdio.h>
#define pi 3.14
int main()
{
float r,area;
printf("enter the value of radius of the circle \n");
scanf("%f",&r);
area= pi*r*r;
printf("the value of area is %f\n",area);
return 0;
}
Write a C program which reads the radius of a circle and finds out the area of the circle.
#include<stdio.h>
#define pi 3.14
int main()
{
float r,area;
printf("enter the value of radius of the circle \n");
scanf("%f",&r);
area= pi*r*r;
printf("the value of area is %f\n",area);
return 0;
}
No comments:
Post a Comment