Write a program to calculate the volume
of a sphere. Then display the result. Use the following formula: V=4/3 π r3.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.
Program Listing
// volume_sphere.cpp
// Author : Jake Rodgriguez Pomperada,MAED-IT,MIT
// Date : October 11, 2020 Sunday
// Website : www.jakerpomperada.blogspot.com / www.jakerpomperada.com
// Email : jakerpomperada@gmail.com
// Location : Bacolod City, Negros Occidental Philippines
#include <iostream>
#include <cmath>
const double Pi = 3.14;
int main()
{
double radius=0.00;
std::cout << "\n\n";
std::cout << "\tVolume of a Sphere in C++";
std::cout << "\n\n";
std::cout << "\tEnter radius: ";
std::cin >> radius;
std::cout << "\n\n";
std::cout << "\tVolume: " << 4 /3 * Pi * std::pow(radius, 3) << '\n';
std::cout << "\n\n";
std::cout << "\tEnd of Program";
}
No comments:
Post a Comment