Answers for "PI IN C++ WITH CMATH"

C++
0

PI IN C++ WITH CMATH

#include <iostream>
#include <cmath>
using namespace std;
float area(int radius) {
   return M_PI * (radius * radius);
}
int main () {
   cout << "Area of a circle with radius 7 unit is: " << area(7);
}
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language