answersLogoWhite

0


Best Answer

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;

...

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

#include#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;

}


This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Write a C program to draw a sphere in computer graphics?

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

#include main () {
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);
}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

double area_of_sphere (double radius) return 4. * 3.1415926535897932384626433832795 * radius * radius;

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C program to find volume of sphere?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a C program to find area of a sphere insimple launge?

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 find Volume and surface area of cube?

Write a c program to compute the surface area and volume of a cube


How do you find volume of a sphere?

The volume of a sphere is 4 / 3 * pi * r3


How to find the volume of a sphere?

Volume of a sphere = 4/3*pi*radius3


How do you find the volume of a sphere?

use the formula 4/3*&pi;*radius3 to find the volume of a sphere.


How do you find the volume on a half-sphere?

Calculate the volume of a full sphere, then divide that by 2.


How do you find the height of a sphere when you have the volume 1232 and radius 7?

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!


How can you find the volume of a small sphere?

Volume of a sphere = 4/3*pi*radius3 measured in cubic units


How do you find the diameter of a sphere from its volume?

the volume is (Pixdiameter^3)/6 which we write as: V=( &pi; &bull;d&sup3;)/6 So diameter is the cube root of (6v/Pi)


Find the volume of a sphere?

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.


How do you find out FORMULA volume of a sphere?

Formula for volume of a sphere = 4/3*pi*radius3 measured in cubic units.


Suppose the sphere below with radius r has a volume equal to 50 units3 Find the volume of the sphere with twice the radius?

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.