Computer Science, asked by jegadheesh27, 11 months ago

Please answer me this question very quickly and correctly Please


Write a C++ program that accepts radius and then displays the area and perimeter
of a circle. Consider “Pi” as a constant with value 3.14.​

Answers

Answered by charlie1505
7

Answer:

#include <iostream>

using namespace std;

#define PI 3.141

int main(){

float radius, area, perimeter;

cout << "Enter radius of circle\n";

cin >> radius;

// Area of Circle = PI x Radius X Radius

area = PI*radius*radius;

cout << "Area of circle : " << area;

perimeter = 2 * (22 / 7) * radius;

cout<<"Perimeter of circle:"<<perimeter;

return 0;

}

Output

Similar questions