home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Plus 2007
/
Programmer-Plus-2007.iso
/
Programming
/
High Level Languages
/
Turbo C v3.0
/
Tc3setup.exe
/
EXAMPLES
/
EX3.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-02-18
|
396 b
|
20 lines
// Borland C++ - (C) Copyright 1991 by Borland International
// ex3.cpp: Inline Functions
// from Hands-on C++
#include <iostream.h>
const float Pi = 3.1415926;
inline float area(const float r) {return Pi * r * r;}
main()
{
float radius;
cout << "Enter the radius of a circle: ";
cin >> radius;
cout << "The area is " << area(radius) << "\n";
return 0;
}