Input radius then calculate and display the volume of a sphere. Java
Answers
Answered by
0
Answer:
Java Program
public class sphere{
public static void main(String args[])
{
int radius=48;
double pie=3.14285714286;
double volume=(4.0/3.0)*pie*(radius*radius*radius);
System.out.println("Volume of the sphere="+volume);
}
Answered by
0
Answer:
#include <stdio.h>
int main()
{
int radius=48;
float pie=3.14285714286;
double volume=(4.0/3.0)*pie*(radius*radius*radius);
printf("Volume of the sphere=%f",volume);
}
Similar questions