Menu

[Solved]Modify Following Program Gets Radius Circumference Cirlce Formula Find Circumference C 2 P Q37120092

modify the following program so that it gets the Radius andthe circumference of a cirlce. The formula to find thecircumference is c= 2(pi)r
also modify the following program so that it gets the radiusand circumference of a circle, but allows the user to enter thevalues to set the radius
7-2 t // This progrm demonstrates simple class with 2 H deftned outstde the class declaration, 3 #include <iostream 4 #includProgram 7-2(continued) 17 Get and display each circles area coat ee the ar髓of Cinc1e1 1rc1e1.cal cAroa() end ; cout << -The7-2 t // This progrm demonstrates simple class with 2 H deftned outstde the class declaration, 3 #include <iostream 4 #include ecrath) 5 using nanespace std: 6 r functions Circle class declaration 8 class Circle 9 ( private: double radius; H This is a senber vartable. 10 12 public: 13 14 votd setRadtus (double): 1 These are just prototypes double catcAreat) H for the senber functions is ): 211 The nenber function implenentation section follow It contains the 1B 11 actual functson definitions for the Ctrcle class aoabor functions. Circle: setRadius This function coptes the argunent passed into the paraneter to the private nenber variable radius void Circle: setRad iust double rt radiusr CirclecalcArea This function calculates and returns the Circie cbject’s ares Lt does not need any paraneters because 1t already has acceSS tothe nenber variable radius double Circteacatcreat return 3 14 Powtradius2 int main Program 7-2(continued) 17 Get and display each circle’s area coat ee “the ar髓of Cinc1e1 1rc1e1.cal cAroa() end ; cout << -The area of circle2 ts -ee circle2. calcArea() << endl; return 0 荐影: 11-52 Show transcribed image text 7-2 t // This progrm demonstrates simple class with 2 H deftned outstde the class declaration, 3 #include

Expert Answer


Answer to modify the following program so that it gets the Radius and the circumference of a cirlce. The formula to find the circu… . . .

OR


Leave a Reply

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