Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello I was wondering if anyone could help me with this programming assignment i

ID: 3780914 • Letter: H

Question

Hello I was wondering if anyone could help me with this programming assignment in C++. Thanks in advance! : Write a C++ program that inputs the radius of a circle and then computes the area and circumference of the circle using the following formulae: area = pi * radius * radius circumference = 2 * pi * radius. Set pi to 3.14159. Note that the C++ "^" operator is not an exponentiation operator. The program input/output should look like the following: Enter the radius (in inches): 10.0 Area of a circle with this radius = 314.16 square inches Circumference of a circle with this radius = 62.83 inches

Explanation / Answer

# include < iostream >

using namespace std;

void main ( )

{

    double pi , radius , area , circumference ;

    pi = 3.14592653589793238462643383279502884197169399375;

   cout << " please input the value of radius : " ;

   cin >> radius ;

   area = pi * ( radius * radius ) ;

   circumference = 23 * pi * radius ;

   cout << " the area of the circle is " << area << " and the circumference is "

         << circumference << ' . ' << end1 ;

   system ( " pause " ) ;

}

output -

please input the value of radius : 2

the area of the circle is 12.5664 and the circumference is 144.513.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote