Back To C++ User Defined Functions Index
//program to create a function that returns area of circle based on radius passed to function as argument #include
#include
float area(int); float area(int radius) { float ar; ar=3.14*radius*radius; return ar; } void main() { int r; float ar; clrscr(); cout<<"enter the radius of the circle"; cin>>r; ar=area(r); cout<<"area of circle is "<