answersLogoWhite

0


Best Answer

/*to find the area of a circle*/

#include<stdio.h> #include<conio.h> main()

{

int r;

float a;

print f ("Enter r value \n");

scan f ("%d", &r);

a=3.14*r*r;

print f("area=%f",a);

}

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

#include<assert.h>

typedef struct rect_t {

int width;

int height;

} rect;

int area (rect* r) {

if (r==NULL) return 0;

return r->width * r->height;

}

int main (void) {

rect r;

int a;

r.width = 10;

r.height = 5;

a = area (&r);

assert (a==50);

return 0;

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

double areaofcircle (double radius) return 2. * 3.141592653589793 * radius;

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

double a,b,c,s,area;

double *parea = &area;

s=(a+b+c)/2;

*parea = sqrt (s*(s-a)*(s-b)*(s-c))

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to calculate area of circle?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to calculate the area of a circle?

#include&lt;stdio.h&gt; void main() { int r=10; float pi=3.14,c; c=pi*r*r; printf("Area of the circle=%f",c); getch(); }


C program on how to calculate circumference of a circle?

int radius = 2; int output; radius = radius * 2; output = radius * Math.PI; Console.WriteLine(output);


How do you find an area of a shape rectangle square and a circle in C program?

By using that one thing.


Write a c program to find the area and perimeter of circle?

Learn c programming and geometry. It will be easy when you know both.


How do you calculate the area from the circumference?

The area of a circle (A) is pi x r x r.The circumference of a circle (C) is pi x d, or pi x 2r.So if you know C, you can calculate r using the formula C = pi x 2r or r = C/2piOnce you know r, you can calculate A using the formula A = pi x r x r


How do you calculate the area of a curcumfrence?

There's no such thing as the "area of a circumference", no matter how you spell it.A circumference is a length, representing the distance around a circle, and doesn'thave an area.If you know the circumference of a circle, and you call it 'C', then the area of the circle isC2 / (4 pi)


Program to find area of circle using class in c?

class area{ int l,w,a; a=i*w; printf"area of rectangle is= %d",a; endl; }


How do you calculate the circumference and area of a circle if the radius is 19cm?

Circumference C = 2 r times pi C = 119.38052083641213 centimeters. Area A = r2 times pi. A = 1134.0815 square centimeters.


Write a program to find the area of circle in c?

PROGRAM TO FIND AREA & PERIMETER OF CIRCLE IN C++#include #include void main(){clrscr();double rad, area, perimeter;coutrad;area=3.14*rad*rad;perimeter=2*3.14*rad;cout


If circle A has a radius of 3 cm and circle B has a radius of 4 cm and circle C has the same total area as circles A and B combined hoe do you determine the radius of circle C?

The formual for area is: A = &pi;r2 so the area of circle A (assuming &pi;=3.142) is 28.278cm2, and the area of circle B is 50.272cm2.Their combined area of 78.55cm2 is the area of circle C.The formula for radius is: square root of A/&pi;78.55 &divide; 3.142 = 25, the square root of 25 is 5The radius of circle C is 5cmArea of Circle A = &pi;32 = 9&pi;Area of Circle B = &pi;42 = 16&pi;Area of Circle C = 9&pi; + 16&pi; = 25&pi;Let r = radius of Circle C then&pi;r2 = 25&pi; : r2 = 25 : r = 5.


What is a c program to find the area and perimeter of circle?

void main() { float pi=3.14,area,perimeter,r=2; area=pi*r*r; perimeter=2*pi*r; getch(); }


How do you express the area of a circle as a function of its radius?

If a circle has radius r, then the area of the circle is pi r2, pi being about 3.14159. I beleive the function you are looking for is A(c)=c/2*r