Computer Science, asked by dhruvagarwal2pkt, 4 months ago

write a c++ program to input the radius of a circle if its square is greater then 99 calculate and display the circumference of the circle otherwise calculate and display its area

circumference = 2*3.14*radius. area = 3.14* radius ^2
​​

Answers

Answered by harkishan941637
0

Answer:

#include <iostream>

#include <cmath>

using namespace std;

int main() {

float radius, area, circumference;

cout << "Please enter the radius of the circle: ";

cin >> radius;

if (pow(radius, 2) > 99) {

circumference = 2 * M_PI * radius;

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

}

else {

area = M_PI * pow(radius, 2);

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

}

return 0;

}

Similar questions