How to write a programme in c to calculate the area of circle?

Answer


We can use any method. As we can find out the area of the circle by three methods as i known.
1.ordinary programming
e.g.

void main()

{
int r;float area;
printf("\n\tEnter radius of the circle : ");

scanf("%d",&r);

area=3.14*r*r;

printf("Radius = %d and area=%f",r,area);

}

2. By using macros

e.g. #define PI 3.14
#define AREA(x) PI*x*x

3. We can solve by user defined functions also

Improve Answer Discuss the question "How to write a programme in c to calculate the area of circle?" Watch Question

First answer by Janugiraman. Last edit by Janugiraman. Contributor trust: 26 [recommend contributor]. Question popularity: 10 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > How to write a programme in c to calculate the area of circle?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Classes in cpp?  Programme for area of triangle?  How can calculate area of a circle?  How can you Write an R in a circle?  How do you calculate the are of a circle?  How do you write programme in c language?  How do you calculate the volume of a circle?  Write a program in c to find out area of circle?  How do you calculate the area of a hexoganal shape?  How do you get the area of the circle flowchartsvg?  How do you calculate the cercumference of a circle?  Write a programme to calculate the area ofa trangle?  How do you calculate the area of circle using macros?  How do you write virus programming using c programme?  Write a programme requesting user first and last name?  Spreadsheets You need to write one of these to calculate things?  Write a program in cpp to find the area of a circle using classes?  How do you write a programme in c to calculate the area of triangle?  How do you write a programme in c to calculate the area of a triangle?  How do you calculate the earliest starting time in Programme Evaluation and Review Techniques?