Finds the radius and height of a 2 liter can that produces the minimum surface area using Newton's method to approximate a zero of dA/dr

What will be an ideal response?


```
double newton (double, double, int&);
double surfaceArea (double);
double surfaceAreaPrime (double);
double surfaceAreaDoublePrime (double);

const int MAX_ITER = 50;

int main()
{
double guess, radius, error;
int found;

cout << endl << "Enter the initial value for the radius "
<< "in centimeters => ";
cin >> guess;
cout << endl << "Enter the acceptable error limit => ";
cin >> error;

radius = newton(guess, error, found);
if (found) {
cout << setprecision(5) << setiosflags(ios::fixed);
cout << endl << "The minimum surface area of a 2 liter can is "
<< surfaceArea(radius) << " square centimeters"<< endl
<< "with a radius of " << radius
<< " centimeters and a height of "
<< 2000 / ( M_PI * radius * radius) << " centimeters"
<< endl << endl;
}

return 0;
}

```

Computer Science & Information Technology

You might also like to view...

Method can be used to set the layout manager of a container.

a. setManager b. setLayout c. setLayoutManager d. setGUILayout

Computer Science & Information Technology

In public-key encryption, the two keys—one for coding and one for decoding—are known as ________

A) key tags B) code keys C) a key pair D) linked keys

Computer Science & Information Technology

A row label corresponds to a data series in a PivotTable report

Indicate whether the statement is true or false

Computer Science & Information Technology

In addition to benchmark testing, performance measurements, called _____, can monitor the number of transactions processed in a given time period, the number of records accessed, and the volume of online data.?

A. ?metrics B. ?wireframes C. ?viewports D. ?baselines

Computer Science & Information Technology