Write a c++ program to find the area of sphere and volume of sphere
Answers
Answered by
0
#include
using namespace std;
const float pi=3.14;
int main()
{ //Declare variables
float r;
double v;
double a;
//Input radius
cout<<"Input radius"< cin>>r;
//Volume of sphere = 4/3(πr3)
v=(4/3)*(pi*r*r*r);
cout<<"Volume of sphere"< //Area of sphere = πr2
a=pi*r*r;
cout<<"Area of Circle"< system ("pause");
return 0;
using namespace std;
const float pi=3.14;
int main()
{ //Declare variables
float r;
double v;
double a;
//Input radius
cout<<"Input radius"< cin>>r;
//Volume of sphere = 4/3(πr3)
v=(4/3)*(pi*r*r*r);
cout<<"Volume of sphere"< //Area of sphere = πr2
a=pi*r*r;
cout<<"Area of Circle"< system ("pause");
return 0;
Similar questions
Geography,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
English,
1 year ago
English,
1 year ago