write an JavaScript program to find the surface area of sphere
Answers
Answered by
2
Answer:
public class shpere{
public static void main(String args[])
{
int radius=37;
double pie=3.14285714286;
double area_sphere=4*pie*(radius*radius);
System.out.println("Surface area of sphere="+area_sphere);
}
Answered by
29
Program :-
public class Sphere
{
public static void main(String args [ ] )
{
final double PI = 3.14159;
double radius = 17.8;
double surfaceArea;
surfaceArea = 4 * PI * radius * radius;
System.out.println(''Surface area of sphere with radius'' + radius + ''is'' + surfaceArea);
}
}
Output :-
Surface area of sphere with radius 17.8 is 3981.5255024000003
Similar questions