219k views
4 votes
Develop a program so that the output will produce the following :

the circumference of the circle is 33.912
the area of the circle is 91.5624.

User Emunsing
by
6.9k points

1 Answer

4 votes

Answer:

#include <iostream>

using namespace std;

int main()

{

float radius = 5.4;

float circumference = 2 * 3.14 * radius;

float area = 3.14 * radius * radius;

cout<<"the circumference of the circle is "<<circumference<<endl;

cout<<"the area of the circle is "<<area<<endl;

return 0;

}

Step-by-step explanation:

Include the library iostream for using the input/output instructions.

create the main function and define the variable with value. Then,

use the formula to calculate the circumference and are of circle.


circumference = 2*\pi *radius


area = \pi * radius^(2)

here, choose
\pi = 3.14

after that, display the result.

Note: All variable define in float type.

User RangerRanger
by
7.6k points