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 radius; //Radius to be input by the user
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
scanf("%d", &radius); //read an integer
printf("Enter the Pi\n"); //prompt
scanf("%d", &pi); //read an integer
area=(pi*radius*radius); //assign total to area
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
thanks in advance