Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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);
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #PI #IN #WITH #CMATH
ADD COMMENT
Topic
Name
6+8 =