double Pi = 3.1415...;//Pi number
double sphereRadius = 0;
double surfaceAreaOfSphere = 0;
...
cout << "Enter a radius of the sphere";
cin >> sphereRadius;
...
surfaceAreaOfSphere = 4*Pi*sphereRadius*sphereRadius;
//or using math.h
surfaceAreaOfSphere = 4*Pi*pow(sphereRadius, 2);
...
cout << "The surface area is: " << surfaceAreaOfSphere;
...
#include
using namespace std;
#define PI 3.14285
int main(){
float r, area;
printf("Enter the radius of the sphere:\t");
scanf(%f", &r);
area = 4 * PI * r * r;//formula for area
printf("Area = %f\n,"area);
return 0;
}
Write a C program to draw a sphere in computer graphics?
#include
float v,r,pi;
pi=3.141593;
printf("Enter radius: ");
scanf("%f",&r);
v=(4/3)*pi*r*r*r;
printf("Volume equals: %f\n",v);
}
double area_of_sphere (double radius) return 4. * 3.1415926535897932384626433832795 * radius * radius;
write a vb program to find the magic square
Write a program to find the grade obtained by the students of a class
what is if(!(str[i]==32))
#include<stdio.h>
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
The "area of a sphere" does not make sense. You must mean the "volume of a sphere". double radius = ...; double volume = 4. / 3. * 3.141592653589793 * radius * radius * radius;
Write a c program to compute the surface area and volume of a cube
The volume of a sphere is 4 / 3 * pi * r3
Volume of a sphere = 4/3*pi*radius3
use the formula 4/3*π*radius3 to find the volume of a sphere.
Calculate the volume of a full sphere, then divide that by 2.
If the radius is 7 and the volume is 1232 the shape cannot be a sphere so you cannot find the height of a sphere when the shape is not a sphere!
Volume of a sphere = 4/3*pi*radius3 measured in cubic units
the volume is (Pixdiameter^3)/6 which we write as: V=( π •d³)/6 So diameter is the cube root of (6v/Pi)
The formula for the volume of a sphere is based on the radius of the sphere. It is equal to 4/3 multiplied by pi, multiplied by the radius cubed.
Formula for volume of a sphere = 4/3*pi*radius3 measured in cubic units.
A sphere with a volume of 50 units3 has a radius of 2.29 units. A sphere with twice the radius (4.58 units) has a volume of 402 units3.