![]() ![]() First, we have to read the radius from the user and assign it to a variable, and to find the area we have to use the formula pi() * pow(radius, 2) and to find the circumference we have to use the formula 2 * pi() * radius. In PHP there are many ways to find the area and circumference of the circle in this program we are using the built-in functions pi() for the pi(3.14) value and pwo() to find the power of the value and we are also using the round() to limit the number of digits after the decimal point. How to find the area and circumference using PHP For example, if the radius of the circle is 7 then the area of the circle will be π * 7 2which will be 153.938 and circumference will be 2 * π * 7 which will be 43.982. To find the area of a circle first we have to get the radius of the circle and use the formula πpi r 2 and to find the circumference we use the formula 2 &pi r. That's the formula for calculating area of a circle. ![]() There are mathematical formulas to find the area and circumference of the circle. Write a Fortran Program to calculate area of a circle All Answers. ![]()
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |