#include using namespace std; // area calculation program that employs functions that return values // Albert Levi 11 Nov, 2002 double circlearea (double radius) { double theArea; theArea = 3.14*radius*radius; return theArea; //or only return 3.14*radius*radius; } int main() { double r, area; r = 3; area = circlearea(r); cout << "the area of the circle with radius " << r << " is " << area << endl; cout << circlearea(12) << endl; if (circlearea(r/2) >= 100) cout << "large circle" << endl; circlearea(r); // syntax ok, but meaningless function call; returned value is not used return 0; }