Course Solutions Uncategorized (Solved) : Formula Compute Area Circle Area R2 R Radius Sphere 314159 Assume Variable Radius Already Q37802775 . . . .

(Solved) : Formula Compute Area Circle Area R2 R Radius Sphere 314159 Assume Variable Radius Already Q37802775 . . . .

 

The formula to compute the area of a circle is:
Area = πr2
where r is the radius of the sphere and π is 3.14159.
Assume a variable radius has already been declared (type double)and initialized with the value of the radius of a sphere.
Write JAVA statements to do the following:
• Declare a constant PI and initialize it to 3.14159
• Declare a variable area type double
• Calculate the area of the circle and store it in the variablearea.
• Display the computed area on the console.

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post