## manutd4life

Hello
just Admit in a university and new in C++

i just wanted to know how to do area for several circle
How to modify the code below to do the area of circle??

here's the code:

``````//Calculate area of a circle
#include <cstdlib>
#include <iostream>

using namespace std;
// function main begins program execution
int main(int argc, char *argv[])
{
int pi; //pi to be input by the user
int area; //variable in which area will be stored

printf("Enter the Radius of the Circle\n"); //prompt
printf("Enter the Pi\n"); //prompt

printf("Area of Circle is %d\n", area); //print area

system("PAUSE");
return 0; //indicate that program ended successfully
return EXIT_SUCCESS;
} //end of function``````

## Kyle Wiering 17

You need to supply more information and understand the problem. Are you looking for a sum of areas of multiple circles, Or a printout of the different circles. Also, are these circles independent or overlapping. You need to understand the problem before you can achieve a solution. How would you do it in real life first?

## manutd4life

Here's the question:
modify the above exercise (Exercise 3) to calculate the area of several circles.

THE exercise 3 is the code i pasted above.
any help

## Tellalca 19

Maybe it will be better to declare pi, radius and area as double or float.

If you want to calculate areas of more circles, you can try a loop and then add the areas to the sum.