Course Solutions Uncategorized (Solved) : Fix Please Help 102 Calculate Volume Sphere Given Formula Volume Sphere Volume 4 3 Pi Rad Q38012176 . . . .

(Solved) : Fix Please Help 102 Calculate Volume Sphere Given Formula Volume Sphere Volume 4 3 Pi Rad Q38012176 . . . .

 

CAN NOT FIX THIS. PLEASE HELP

10.2 Calculate Volume of a Sphere

Given the formula for volume of a sphere as: Volume= 4/3 * PI *radius^3 Write a program that inputs a radius as a floating pointnumber (double) and outputs the volume as a floating point number.Three places of precision are needed in the output. The value of PI= 3.14.

MY CODE:

#include <iostream>
#include <iomanip>

using namespace std;

int main() {
double radius, pi = 3.14;
cin >> radius;
cout << setprecision(3) << fixed;
double volume = (4.0 / 3) * pi *radius*radius*radius;
cout << “Volume of a Sphere with Radius “<<radius<<“is = ” <<volume;
return 0;
}

Only show failing tests Download this submission 0/4 1: Compare output 1 Output differs. See highlights below Input 10.0 Your

Only

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 1 Solve Following Differential Equation Using Laplace Transform Method Y Y F T Y 0 1 F T Q32518825 . . . .(Solved) : 1 Solve Following Differential Equation Using Laplace Transform Method Y Y F T Y 0 1 F T Q32518825 . . . .

<p><img alt="1. Solve the following differential equation using the Laplace transform method y-y=f(t), y(0)=1, where f(t)" src="https://media.cheggcdn.com/media%2F23e%2F23e86a4c-d4fe-4b6f-bb3b-c22b8719c240%2FphpnaCtkh.png" style="height:264px;width:1024px;" aria-describedby="d3f"/></p>1. Solve the following differential equation using the Laplace transform method y-y=f(t),