Circumference of the circle

Repeat Programming Exercise 3 by declaring num1, num2, and num3, and average of type double. Store 75.35 into num1, -35.56 into num2, and 15.76 into num3.

Consider the following C++ program in which the statements are in the incorrect order. Rearrange the statements so that it prompts the user to input the radius of a circle and outputs the area and circumference of the circle.

#include

 int main()  

 cout < “enter=”” the=”” radius:=”” “;=””>

cin >> radius;

cout < endl;=””  =””>

double radius;

double area;  

using namespace std;  

return 0;  

cout

area = pi * radius * radius;  

circumference = 2 * pi * radius;  

cout

const double pi = 3.14;  

double circumference;

“area=”

area = PI * radius * radius;  

circumference = 2 * PI * radius;  

cout << ” circumference=””>

area = pi * radius * radius;  

circumference = 2 * pi * radius;  

cout

const double pi = 3.14;  

double circumference;

}

>

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X