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;
}
>